Description Usage Arguments Value
Find the k nearest neighbors from a point x_query
and all rows in a dataset X
.
1 | nearest_neighbors(X, x_query, k, dist_func = mydist, ...)
|
X |
Feature matrix of shape [n_samples, n_features]. |
x_query |
A single vector of shape [n_features]. |
k |
The number of nearest neighbors to compute. |
dist_func |
A function that defines a valid distance. The default is euclidean distance. |
... |
These parameters are passed into |
The indices of the k-nearest neighbors.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.