Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
对于scikit-learn 的 KNN 包,可以指定sklearn.metrics.pairwise不是 p 范数或 Minkowski 距离的成对距离度量(来自包)吗?例如,我可以使用RBF 内核吗?甚至是余弦距离?
sklearn.metrics.pairwise
不幸的是,用于在中低维数上计算快速精确 NN 搜索的 BallTree 算法不能与任意指标一起使用。