선형 대수 개념도 살펴보아야 했다. 앞으로 살펴볼 머신러닝 모델들(로지스틱 회귀, 서포트 벡
터 머신, 의사 결정 트리, 랜덤 포레스트 등)의 경우 똑같은 개념과 아이디어를 다른 함수에 적
용하기만 하면 되기 때문에 더 빠르게 살펴볼 수 있을 것이다.
3.4
로지스틱 회귀: 이항 분류
로지스틱 회귀는 주로 분류를 목적으로 사용된다. 먼저 이 모델을 이항 분류 작업에 어떻게 사
용할 수 있는지 설명한다. 이항 분류의 예로는 암/암이 아님, 어린이에게 안전함/안전하지 않
음, 대출 상환 가능/가능하지 않음 등 두 가지 클래스
class
로 분류하는 것들이 있다. 그런 다음 모
델을 일반화하여 여러 클래스로 분류하는 문제를 풀도록 한다. 구성은 <
3
.
3
회귀>와 동일하다.
1
훈련 함수
2
손실 함수
3
최적화
3.4.1
훈련 함수
선형 회귀와 마찬가지로 로지스틱 회귀에 사용되는 훈련 함수는 피처의 선형 조합을 계산하고
편향인 상수 항을 더한다. 그리고 결과를 그대로 출력하지 않고 로지스틱 함수를 통과시킨다.
로지스틱 함수의 그래프는 [그림
3
-
14
]에서 확인할 수 있으며 식은 다음과 같다.
s
e1
1
s
v
=
+
-
Q
V
이 함수는
0
과
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.
O’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
I 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
I’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
I'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.