This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn.neighbors import NearestNeighbors | |
| import numpy as np | |
| X = np.array([[-1, -1], [-2, -1], [-3, -2], [1, 1], [2, 1], [3, 2]]) | |
| """ | |
| Build a fast indexing data-structure. | |
| :param algorithm: ['auto', 'ball_tree', 'kd_tree', 'brute'] | |
| - compared to kd_tree, ball_tree needs more time to build tree, but query fast for high-dim data. | |
| :param n_neighbors: only effective when using 'kneighbors' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"lastUpload":"2017-06-03T08:54:59.130Z","extensionVersion":"v2.8.1"} |