class_docstr: Scikit-learn wrapper interface for Faiss KNN.
  
  Parameters
  ----------
  n_neighbors : int (Default = 5)
              Number of neighbors used in the nearest neighbor search.
  
  n_jobs : int (Default = None)
           The number of jobs to run in parallel for both fit and predict.
            If -1, then the number of jobs is set to the number of cores.
  
  algorithm : {'brute', 'voronoi'} (Default = 'brute')
  
      Algorithm used to compute the nearest neighbors:
  
          - 'brute' will use the :class: `IndexFlatL2` class from faiss.
          - 'voronoi' will use :class:`IndexIVFFlat` class from faiss.
          - 'hierarchical' will use :class:`IndexHNSWFlat` class from faiss.
  
      Note that selecting 'voronoi' the system takes more time during
      training, however it can significantly improve the search time
      on inference. 'hierarchical' produce very fast and accurate indexes,
      however it has a higher memory requirement. It's recommended when
      you have a lots of RAM or the dataset is small.
  
      For more information see: https://github.com/facebookresearch/faiss/wiki/Guidelines-to-choose-an-index
  
  n_cells : int (Default = 100)
      Number of voronoi cells. Only used when algorithm=='voronoi'.
  
  n_probes : int (Default = 1)
      Number of cells that are visited to perform the search. Note that the
      search time roughly increases linearly with the number of probes.
      Only used when algorithm=='voronoi'.
  
  References
  ----------
  Johnson Jeff, Matthijs Douze, and Hervé Jégou. "Billion-scale similarity
  search with gpus." arXiv preprint arXiv:1702.08734 (2017).
docstr: Finds the K-neighbors of a point.
  
  Parameters
  ----------
  
  X : array of shape (n_samples, n_features)
      The input data.
  
  n_neighbors : int
      Number of neighbors to get (default is the value passed to the
      constructor).
  
  return_distance : boolean, optional. Defaults to True.
      If False, distances will not be returned
  
  Returns
  -------
  dists : list of shape = [n_samples, k]
      The distances between the query and each sample in the region of
      competence. The vector is ordered in an ascending fashion.
  
  idx : list of shape = [n_samples, k]
      Indices of the instances belonging to the region of competence of
      the given query sample.
docstr_tok: ["Finds","the","K-neighbors","of","a","point",".","Parameters","--","--","--","--","--","X",":","array","of","shape","(","n_samples",",","n_features",")","The","input","data",".","n_neighbors",":","int","Number","of","neighbors","to","get","(","default","is","the","value","passed","to","the","constructor",")",".","return_distance",":","boolean",",","optional",".","Defaults","to","True",".","If","False",",","distances","will","not","be","returned","Returns","--","--","--","-","dists",":","list","of","shape","=","[","n_samples",",","k","]","The","distances","between","the","query","and","each","sample","in","the","region","of","competence",".","The","vector","is","ordered","in","an","ascending","fashion",".","idx",":","list","of","shape","=","[","n_samples",",","k","]","Indices","of","the","instances","belonging","to","the","region","of","competence","of","the","given","query","sample","."]
code: def kneighbors(self, X, n_neighbors=None, return_distance=True):
      """Finds the K-neighbors of a point.
  
      Parameters
      ----------
  
      X : array of shape (n_samples, n_features)
          The input data.
  
      n_neighbors : int
          Number of neighbors to get (default is the value passed to the
          constructor).
  
      return_distance : boolean, optional. Defaults to True.
          If False, distances will not be returned
  
      Returns
      -------
      dists : list of shape = [n_samples, k]
          The distances between the query and each sample in the region of
          competence. The vector is ordered in an ascending fashion.
  
      idx : list of shape = [n_samples, k]
          Indices of the instances belonging to the region of competence of
          the given query sample.
      """
      if n_neighbors is None:
          n_neighbors = self.n_neighbors
  
      elif n_neighbors <= 0:
          raise ValueError(
              "Expected n_neighbors > 0." " Got {}".format(n_neighbors)
          )
      else:
          if not np.issubdtype(type(n_neighbors), np.integer):
              raise TypeError(
                  "n_neighbors does not take {} value, "
                  "enter integer value".format(type(n_neighbors))
              )
  
      check_is_fitted(self, "index_")
  
      X = np.atleast_2d(X).astype(np.float32)
      dist, idx = self.index_.search(X, n_neighbors)
      if return_distance:
          return dist, idx
      else:
          return idx
  
file_path: DESlib/deslib/util/faiss_knn_wrapper.py
imports: import numpy
  from sklearn.utils.validation import check_is_fitted
label_desc: Use image node_id 3 for calling the FaissKNNClassifier obj's underlying member method code with example usage: obj.kneighbors(X, n_neighbors, return_distance) and returns: dist,  idx, idx