, method='knn', k=1, n_jobs=None)[source]#

Generate kNN in subspace.

z_arrarray_like of shape (n_samples, n_features_z)

The covariate space.

methodstr, optional

Method to use, by default ‘knn’. Can be (‘knn’, ‘kdtree’).

kint, optional

The number of k-nearest neighbors to query, by default 1.


The number of CPUs to use for joblib. By default, None.

indicesarray_like of shape (n_samples, k)

The indices of the k-nearest-neighbors for each sample.