jiehou commited on
Commit
c9d52c2
·
1 Parent(s): 6480e50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -106,7 +106,7 @@ def KNN_predict(train_features, train_labels, test_feature, K):
106
  neighbor_imgs.append(neighbor_feature)
107
 
108
  ### get final prediction
109
- final_prediction = scipy.stats.mode(major_class).mode[0]
110
 
111
  ### get frequency of classes
112
  class_freq = {}
 
106
  neighbor_imgs.append(neighbor_feature)
107
 
108
  ### get final prediction
109
+ final_prediction = scipy.stats.mode(major_class)
110
 
111
  ### get frequency of classes
112
  class_freq = {}