class turicreate.nearest_neighbors.NearestNeighborsModel(model_proxy)

The NearestNeighborsModel represents rows of an SFrame in a structure that is used to quickly and efficiently find the nearest neighbors of a query point.

This model cannot be constructed directly. Instead, use turicreate.nearest_neighbors.create() to create an instance of this model. A detailed list of parameter options and code samples are available in the documentation for the create function.


NearestNeighborsModel.query(dataset[, …]) For each row of the input ‘dataset’, retrieve the nearest neighbors from the model’s stored data.
NearestNeighborsModel.save(location) Save the model.
NearestNeighborsModel.similarity_graph([k, …]) Construct the similarity graph on the reference dataset, which is already stored in the model.
NearestNeighborsModel.summary([output]) Print a summary of the model.