add knn and pca in python