델을 학습시키는 방법을 설명합니다. 그 후에는 분류 모델을 평가하고 개선하는 다양한 방법을
다룹니다. 마지막으로, 데이터셋에 다양한 변환과 학습 알고리즘을 통합하는 사이킷런의
파이
프라인
도 소개합니다.
7.4.1
로지스틱 회귀
로지스틱 회귀 모델의 목표는 데이터가 두 개의 불연속적인 범주 중 어느 쪽에 속하는지를 예
측하는 것입니다. 이를 간단히 표현하기 위해,두 범주를 각각
y
=
1
과
y
=
0
이라고 표현합니
다. 두 범주 중 하나는 ‘양성’, 다른 하나는 ‘음성’ 범주라고도 생각할 수 있습니다. 선형 회귀와
마찬가지로 입력은 숫잣값들의 목록이지만,출력은 특징 목록이 주어졌을 때 양수 클래스를 예
측할 확률
x
입니다. 이 확률은
Pyx
(|
)=1
처럼 표현할 수 있습니다.
y
=
1
이면 이 확률이
가능한 한
1
에,
y
=
0
이면 확률이 가능한한
0
에 가까워지면 좋습니다.
그렇다면 이 확률은 어떻게 계산할까요? 선형 회귀에서는
f
(
x
)=
w
0
+
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.