KNN algorithm

장재성·2021년 7월 11일
0

알고리즘 (Algorithm)

목록 보기
3/9

KNN(K-Nearest Neighbor)

  • One of the classification algorithms

  • 기존의 data set 에 new data가 입력 되었을 때, new data를 가장 가까운 기존의 data와 같은 data라고 인지하는 형식의 알고리즘

  • K 의 값에 따라 new data가 어떤 data로 인식하느냐가 결정된다

    if K == 1 : new data == orange
    elif K == 3 : new data == green

  • 계산에 사용될 neighbor는 가까운 순으로 결정한다

  • K=1 은 좋지 않다. 너무 specific 하게 data를 구분하게 되므로 다양한 형태의 광범위한 data를 다루는데 적합하지 않다.

  • Reference
    https://ratsgo.github.io/machine%20learning/2017/04/17/KNN/

profile
초심자

2개의 댓글

comment-user-thumbnail
2021년 7월 12일

잘 봤습니다. k가 인접한 몇개까지 포함하는지 나타내는 숫자가 맞나요?

1개의 답글