Monday, February 12, 2007

KNN > SVM

I just finished fixing my K-nearest neighbor program and what do you know, its detection rate is consistently better than the svm. The results on the k-fold cross-validation testing where k=5 is:

KNN

(K=1)
  1. 72% accuracy, # test images = 129
  2. 82% accuracy, # test images = 129
  3. 75% accuracy, # test images = 129
  4. 74% accuracy, # test images = 128
  5. 77% accuracy, # test images = 129
(K=3)
  1. 79% accuracy, # test images = 129
  2. 83% accuracy, # test images = 129
  3. 77% accuracy, # test images = 129
  4. 75% accuracy, # test images = 128
  5. 77% accuracy, # test images = 129
(K=5)
  1. 75% accuracy, # test images = 129
  2. 86% accuracy, # test images = 129
  3. 81% accuracy, # test images = 129
  4. 73% accuracy, # test images = 128
  5. 77% accuracy, # test images = 129
(K=7)
  1. 79% accuracy, # test images = 129
  2. 84% accuracy, # test images = 129
  3. 76% accuracy, # test images = 129
  4. 74% accuracy, # test images = 128
  5. 79% accuracy, # test images = 129

SVM
  1. 79% accuracy, # test images = 129
  2. 65% accuracy, # test images = 129
  3. 59% accuracy, # test images = 129
  4. 62% accuracy, # test images = 128
  5. 71% accuracy, # test images = 129
Personally, I find these results very interesting....

No comments: