1장 정리 / Overview of Chapter 1
1장 - 소개 & 첫 번째 애플리케이션
1장에서는 붓꽃을 구별짓는 간단한 훈련을 했다
지도학습을 하려면 각 데이터들의 특징이 최대한 명확하게 구분되어야 할 것 같다.
- 입출력 샘플 데이터를 이미 갖고있고, 주어진 입력에 대한 출력을 예측하고자 할 때 지도학습을 사용할 수 있다.
나는 k-최근접 이웃 알고리즘(k-Nearest Neighbors, 이하 k-NN)을 사용했다.
객체를 생성할 때 몇 개의 가까운 이웃을 찾을 지 지정할 수 있다.
ex)
knn = KNeighborsClassifier(n_neighbors = num)
k-NN알고리즘을 사용하기 위해서는, 무엇보다 명확한 데이터를 사용하는것이 중요하다.(물론 지도학습이라면 명확하게 알고있는 데이터가 필요하겠지만 말이다)
Chapter1. Intro&First App
In chapter 1, I trained it to classify iris.
To do Supervised-Learning, I think I should classify the sets of datas as clearly as possible.
- You can use Supervised-Learning when you have sample data (inputs and outputs) and want to predict the output of given input.
I used k-Nearest Neighbors (k-NN)algorithm.
I can specify the number of neighbors when I make an Object.
e.g.)
knn = KNeighborsClassifier(n_neighbors = num)
When you apply k-NN algorithm, you need data that are clearly classified.(Well, you’ll need classified data anyway, if you’re doing Supervised-Learning)