회귀 평가는 분류에서와 비슷하게 할 수 있습니다. 예를 들면, 타깃을 과대 예측한 것 대비 과
소 예측한 것을 분석합니다. 그러나 대부분의 애플리케이션에서는 회귀 추정기의
score
메서
드에서 이용하는
R
2
만으로 충분합니다. 가끔 평균 제곱 에러나 평균 절댓값 에러를 사용하여
모델을 튜닝할 때 이런 지표를 기반으로 비즈니스 결정을 할 수 있습니다. 그러나 일반적으로
R
2
이 회귀 모델을 평가하는 데 더 나은 지표입니다.
5.3.5
모델 선택에서 평가 지표 사용하기
많은 평가 방법과 그 방법들을 주어진 타깃값과 모델에 어떻게 적용하는지 자세히 다루었습니
다. 그러나
GridSearchCV
나
cross
_
val
_
score
를 사용하여 모델을 선택할 때,
AUC
같은 평
가 지표를 사용하고 싶은 경우가 많이 있습니다. 다행히
scikit
-
learn
에서는
GridSearchCV
와
cross
_
val
_
score
의
scoring
매개변수를 통해 손쉽게 이를 구현할 수 있습니다. 사용하려
는 평가 지표를 문자열로 넘겨주기만 하면 됩니다. 예를 들어
digits
데이터셋을 가지고 ‘
9
와
9
아님’을 분류하는
SVM
모델을 평균 ...
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.