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

개발자를 위한 필수 수학

by 토머스 닐드, 박해선
June 2024
Beginner to intermediate
352 pages
9h 29m
Korean
Hanbit Media, Inc.
Content preview from 개발자를 위한 필수 수학
175
5
장
선형 회귀
LinearRegression
모델의
fit
()
메서드를 호출합니다.
7
훈련된 모델에서 학습된 선형 함수
의 계수
m
과
b
를 얻을 수 있습니다.
이 계수를 사용해 그래프를 그리면 [그림
5
-
5
]와 같이 데이터를 통과하는 직선을 확인할 수 있
습니다.
그림
5-5
사이킷런으로 훈련한 회귀 직선
그런데 데이터에 가장 잘 맞는 직선을 어떻게 결정할까요? 다음 절에서 알아보겠습니다.
5.2
잔차와 제곱 오차
사이킷런과 같은 머신러닝 패키지는 어떻게 데이터에 맞는 직선을 찾을까요? 이는 머신러닝
훈련의 기본이 되는 두 가지 질문으로 요약할 수 있습니다.
•
최적을 정의하는 기준은 무엇인가요?
•
최적에 도달하려면 어떻게 해야 할까요?
7
옮긴이_
model
=
LinearRegression
().
fit
(
X
,
Y
)
코드는
LinearRegression
클래스의 객체를 만든 후
fit
()
메서드를 바로 호
출합니다.
fit
()
메서드는 모델을 훈련한 후 모델 객체 자신을 반환하기 때문에 이런 메서드 체이닝(
method
chaining
) 기법이 가능합
니다. 이 코드는 다음과 같이 나눠 쓸 수 있습니다.
model
=
LinearRegression
()
model
.
fit
(
X
,
Y
)
176
개발자를 위한 필수 수학
첫 번째 질문에는 이미 잘 정의된 답이 있습니다. ...
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