k-Nearest Neighbor

CS231n课程笔记翻译:图像分类笔记(上)
CS231n课程笔记翻译:图像分类笔记(下)



1 With N examples, how fast are training and prediction?

  • Train O(1)
  • predict O(N)

This is bad: we want classifiers that are fast at prediction; slow for training is ok.

2 hyper-parameters(choices about the algorithm that we set rather than learn)

  • What is the best distance to use?
  • What is the best value of k to use?

3 k-Nearest Neighbor on images never used

  • Very slow at test time

  • Distance metrics on pixels are not informative
    k-Nearest Neighbor

  • Curse of dimensionality(维数灾难)
    维数越高,需要填充的样本指数级增长
    k-Nearest Neighbor

4 Difference between L1 and L2

k-Nearest Neighbor

demo: http://vision.stanford.edu/teaching/cs231n-demos/knn/
k-Nearest Neighbor