def trainKNN(features, K):
 [Xt, Yt] = listOfFeatures2Matrix(features)
 knn = kNN(Xt, Yt, K)
 return knn

def trainKNN ( features , K ) : [ Xt , Yt ] = listOfFeatures2Matrix ( features ) knn = kNN ( Xt , Yt , K ) return knn
train a knn classifier .