Skip to Content
데이터 과학을 위한 통계(2판)
book

데이터 과학을 위한 통계(2판)

by 이준용, 피터 브루스, 앤드루 브루스, 피터 게데크
May 2021
Beginner to intermediate
380 pages
9h 22m
Korean
Hanbit Media, Inc.
Content preview from 데이터 과학을 위한 통계(2판)
293
6
통계적 머신러닝
1.
데이터를 학습용 데이터와 타당성검사용(홀드아웃 ) 데이터로 나눈다.
2.
학습 데이터를 이용해 트리를 키운다.
3.
트리를 단계적으로 계속해서 가지치기한다. 매 단계마다
학습 데이터
를 이용해
cp
를 기록
한다.
4.
타당성검사 데이터
에 대해 최소 에러(손실 )를 보이는
cp
를 기록한다.
5.
데이터를 다시 학습용 데이터와 타당성검사용 데이터로 나누고, 마찬가지로 트리를 만들
고 가지치기하고
cp
를 기록하는 과정을 반복한다.
6.
이를 여러 번 반복한 후 각 트리에서 최소 에러를 보이는
cp
값의 평균을 구한다.
7.
원래 데이터를 이용해 위에서 구한
cp
의 최적값을 가지고 트리를 만든다.
rpart
함수에서 변수
cptable
을 이용해
cp
값과 이에 해당하는 교차타당성검사 에러 (변수
xerror
)를 보이는 테이블을 얻을 수 있다. 이를 참고해 교차타당성검사 에러가 가장 적은
cp
값을 선정할 수 있다.
파이썬에서 트리 복잡도 제어하기
사이킷런에 구현된 의사 결정 트리에서 복잡도를 위한 인수는
cpp
_
alpha
다. 기본값은
0
이며,
이는 트리를 가지치기하지 않는다. 값이 높아질수록 트리는 작아진다.
GridSearchCV
를 사용
하여 최적의 값을 찾을 수 있다.
트리 크기를 제어할 수 있는 다양한 모델 파라미터가 있다. 예를 들어
max
_
depth
5
에서
30
사이,
min
_
samples
_
split
20
에서
100
사이의 범위로 값을 변화시킬 수 있다. 사이킷런의
GridSearchCV
방법은 모든 ...
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

데이터 엔지니어를 위한 97가지 조언

데이터 엔지니어를 위한 97가지 조언

Tobias Macey, 임혜연(Lim Hye Yeon)
파이썬으로 살펴보는 아키텍처 패턴

파이썬으로 살펴보는 아키텍처 패턴

오현석, 해리 퍼시벌, 밥 그레고리

Publisher Resources

ISBN: 9791162244180