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

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

by 박해선, 안드레아스 뮐러, 세라 가이도
April 2019
Beginner to intermediate
480 pages
12h 34m
Korean
Hanbit Media, Inc.
Content preview from 파이썬 라이브러리를 활용한 머신러닝(번역개정판): 사이킷런 핵심 개발자가 쓴 머신러닝과 데이터 과학 실무서
49
1
소개
Out [27]:
X_new.shape: (1, 4)
붓꽃 하나의 측정값은
2
차원
NumPy
배열에 행으로 들어갑니다.
scikit
-
learn
은 항상 데이터
2
차원 배열일 것으로 예상합니다.
예측에는
knn
객체의
predict
메서드를 사용합니다.
In [28]:
prediction = knn.predict(X_new)
print("예측:", prediction)
print("예측한 타깃의 이름:",
iris_dataset['target_names'][prediction])
Out [28]:
예측: [0]
예측한 타깃의 이름: ['setosa']
우리가 만든 모델이 새로운 붓꽃을
setosa
품종을 의미하는 클래스
0
으로 예측했습니다. 그런
데 어떻게 이 모델의 결과를 신뢰할 수 있을까요? 이 샘플의 정확한 품종을 모른다는 사실이
모델을 구축하는 데 있어서 중요한 의미를 가집니다.
1.7.6
모델 평가하기
앞서 만든 테스트 세트를 사용할 때가 왔습니다. 이 데이터는 모델을 만들 때 사용하지 않았고
테스트 세트에 있는 각 붓꽃의 품종을 정확히 알고 있습니다.
따라서 테스트 데이터에 있는 붓꽃의 품종을 예측하고 실제 레이블 (품종 )과 비교할 수 있습니다.
얼마나 많은 붓꽃 품종이 정확히 맞았는지
정확도
를 계산하여 모델의 성능을 평가합니다.
In [29]: ...
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