I'm trying to adapt some methods that use kneighbors_graph from scikit-learn but I need access to the mode=connectivity and include_self=True which are not supported in the current fit methods. Here's some more details on the problem: https://stackoverflow.com/questions/78486997/how-to-reproduce-kneighbors-graphinclude-self-true-using-kneighborstransfor . My goal is to speed up some DiffusionMap algorithms that use KNN methods but I need the connectivity and include_self options.
mode{‘connectivity’, ‘distance’}, default=’connectivity’
Type of returned matrix: ‘connectivity’ will return the connectivity matrix with ones and zeros, and ‘distance’ will return the distances between neighbors according to the given metric.
include_selfbool or ‘auto’, default=False
Whether or not to mark each sample as the first nearest neighbor to itself. If ‘auto’, then True is used for mode=’connectivity’ and False for mode=’distance’.
I'm trying to adapt some methods that use
kneighbors_graph
from scikit-learn but I need access to the mode=connectivity and include_self=True which are not supported in the current fit methods. Here's some more details on the problem: https://stackoverflow.com/questions/78486997/how-to-reproduce-kneighbors-graphinclude-self-true-using-kneighborstransfor . My goal is to speed up some DiffusionMap algorithms that use KNN methods but I need the connectivity and include_self options.Here's the docs: https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.kneighbors_graph.html#sklearn.neighbors.kneighbors_graph