Skip to Content
개발자를 위한 필수 수학
book

개발자를 위한 필수 수학

by 토머스 닐드, 박해선
June 2024
Beginner to intermediate
352 pages
9h 29m
Korean
Hanbit Media, Inc.
Content preview from 개발자를 위한 필수 수학
231
6
장
로지스틱 회귀와 분류
b0 = 0.01
L = .01
for j in range(10_000):
b1 += d_b1(b1, b0) * L
b0 += d_b0(b1, b0) * L
print(b1, b0)
# 0.6926693075370812 -3.175751550409821
β
0
와
β
1
에 대한 편도함수를 계산한 후 데이터 포인트의 개수
n
과
x
,
y
값을 대입합니다. 그런
다음 효율성을 위해
lambdify
()
를 사용해 편도함수를 파이썬 함수로 변환합니다(이 함수는
이면에서 넘파이를 사용합니다). 그 후
5
장에서 했던 것처럼 경사 하강법을 수행하지만, 최소화
가 아닌 최대화를 시도하기 때문에 최소 제곱법에서처럼
β
0
와
β
1
을 빼는 것이 아니라 더합니다.
[예제
6
-
8
]에서 볼 수 있듯이
β
0
= -
3
.
17575
,
β
1
=
0
.
692667
을 얻습니다. 이는 앞서 사이킷
런으로 얻은 값과 매우 유사합니다.
5
장에서 배운 것처럼 확률적 경사 하강법을 사용해 각 반복에서 하나 또는 몇 개의 데이터 포
인트만 샘플링할 수도 있습니다. 이렇게 하면 계산 속도와 성능을 향상하고 과대적합을 방지할
수 있습니다.
6.3
다변수 로지스틱 회귀
이번에는 여러 입력 변수에 대해 로지스틱 회귀를 사용하는 예제를 살펴봅니다. [표
6
-
1
]은 고
용 유지 데이터로 구성된 가상의 데이터셋에서 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

AI를 위한 필수 수학

AI를 위한 필수 수학

할라 넬슨

Publisher Resources

ISBN: 9791169212502