mars.learn.neighbors.NearestNeighbors¶
-
class
mars.learn.neighbors.NearestNeighbors(n_neighbors=5, radius=1.0, algorithm='auto', leaf_size=30, metric='minkowski', p=2, metric_params=None, **kwargs)[source]¶ -
__init__(n_neighbors=5, radius=1.0, algorithm='auto', leaf_size=30, metric='minkowski', p=2, metric_params=None, **kwargs)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__([n_neighbors, radius, algorithm, …])Initialize self.
fit(X[, y, session, run_kwargs])Fit the model using X as training data
get_params([deep])Get parameters for this estimator.
kneighbors([X, n_neighbors, …])Finds the K-neighbors of a point.
kneighbors_graph([X, n_neighbors, mode, …])Computes the (weighted) graph of k-Neighbors for points in X
set_params(**params)Set the parameters of this estimator.
-