finish knn, fix bug in logistic