sklearn.neighbors模块里面实现了knn的几种近邻算法,具体如下: 分类树:KNeighborsClassifier 回归树KNeighborsRegression 参考博客:https://www.cnblogs.com/pinard/p/6065607.html