class_docstr: Base class for nearest neighbors estimators.
class_docstr_tok: ["Base","class","for","nearest","neighbors","estimators","."]
code: def __init__(
      self,
      n_neighbors=None,
      radius=None,
      algorithm="auto",
      leaf_size=30,
      metric="minkowski",
      p=2,
      metric_params=None,
      n_jobs=None,
  ):
      self.n_neighbors = n_neighbors
      self.radius = radius
      self.algorithm = algorithm
      self.leaf_size = leaf_size
      self.metric = metric
      self.metric_params = metric_params
      self.p = p
      self.n_jobs = n_jobs
      self._check_algorithm_metric()
  
imports: import warnings
  from abc import ABCMeta, abstractmethod
  import numpy
  from sklearn.base import BaseEstimator, MultiOutputMixin
  from ...None import tensor
  from ...tensor.reshape.reshape import _reshape
  from ..metrics.pairwise import PAIRWISE_DISTANCE_FUNCTIONS
  from ..metrics import pairwise_distances_topk
  from ..utils import check_array
  from ..utils.validation import check_is_fitted
  from ._ball_tree import create_ball_tree, ball_tree_query, SklearnBallTree
  from ._kd_tree import create_kd_tree, kd_tree_query, SklearnKDTree
  from ._faiss import build_faiss_index, faiss_query, METRIC_TO_FAISS_METRIC_TYPE
  from ._proxima import build_proxima_index, proxima_query, METRIC_TO_PROXIMA_METRIC_TYPE
  from ._kneighbors_graph import KNeighborsGraph
label_desc: Use image node_id 1 to create a new NeighborsBase object from inherited base classes: BaseEstimator, MultiOutputMixin with example: obj = NeighborsBase(n_neighbors, radius, algorithm, leaf_size, metric, p, metric_params, n_jobs)