This section looks at how to identify neighborhoods and nearest neighbors for a dataset of a given metric and its applications.
How to identify neighborhoods and nearest neighbors for a dataset and a given metric
How to do it…
This table represents the main parameters of the function to follow:
Parameters |
data: (N,K) array_like. The data points to be indexed. This array is not copied and so modifying this data will result in bogus results. leafsize: int, optional. The number of points at which the algorithm switches over to brute-force. This has to be positive. |
Raises |
RuntimeError: The maximum recursion limit can be exceeded for large datasets. If this happens, either increase the value for the leafsize parameter... |