Skip to Content
파이썬 라이브러리를 활용한 머신러닝(번역개정판): 사이킷런 핵심 개발자가 쓴 머신러닝과 데이터 과학 실무서
book

파이썬 라이브러리를 활용한 머신러닝(번역개정판): 사이킷런 핵심 개발자가 쓴 머신러닝과 데이터 과학 실무서

by 박해선, 안드레아스 뮐러, 세라 가이도
April 2019
Beginner to intermediate
480 pages
12h 34m
Korean
Hanbit Media, Inc.
Content preview from 파이썬 라이브러리를 활용한 머신러닝(번역개정판): 사이킷런 핵심 개발자가 쓴 머신러닝과 데이터 과학 실무서
396
파이썬 라이브러리를 활용한 머신러닝(번역개정판)
은 이 장의 시작 부분에서 직접 변환한 코드의 결과와 같습니다. 파이프라인을 사용하면 “전처
리 + 분류” 과정을 위해 작성해야 할 코드가 줄어듭니다. 그러나 파이프라인의 가장 큰 장점은
cross
_
val
_
score
GridSearchCV
에 파이프라인을 하나의 추정기처럼 사용할 수 있다는 것
입니다.
6.3
그리드 서치에 파이프라인 적용하기
그리드 서치에 파이프라인을 사용하는 방식 역시 다른 추정기를 사용할 때와 같습니다. 탐색할
매개변수 그리드를 정의하고, 이 매개변수 그리드와 파이프라인으로
GridSearchCV
의 객체
를 만듭니다. 그런데 매개변수 그리드를 만들 때 조금 달라지는 것이 있습니다. 각 매개변수가
파이프라인의 어떤 단계에 속한 것인지 알려줘야 합니다.
C
gamma
매개변수는 두 번째 단
계인
SVC
의 매개변수입니다. 앞에서 이 단계의 이름을 “
svm
”이라고 지정했습니다. 파이프라
인용 매개변수 그리드는 단계 이름과 매개변수 이름을 “__” (밑줄 문자
2
개)로 연결해 만듭니
다. 그래서
SVC
의 매개변수
C
를 그리드 서치로 탐색하려면 매개변수 그리드 딕셔너리의 키를
svm
__
C
”로 해야 하고
gamma
에 대해서도 동일합니다.
In [10]:
param_grid = {'svm__C': [ ...
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

데이터 과학을 위한 통계: 데이터 분석에서 머신러닝까지 50가지 핵심 개념

데이터 과학을 위한 통계: 데이터 분석에서 머신러닝까지 50가지 핵심 개념

이준용, 피터 브루스, 앤드루 브루스

Publisher Resources

ISBN: 9791162241646