Sort out incorrect knn code
Update doc