class_docstr: Class for building, loading and working with Hierarchical Navigable Small World index with SciKit-Learn
  Estimator compatible interface.
  Mostly drop-in replacement for sklearn.neighbors.NearestNeighbors (except for some parameters)
class_docstr_tok: ["Class","for","building",",","loading","and","working","with","Hierarchical","Navigable","Small","World","index","with","SciKit-Learn","Estimator","compatible","interface",".","Mostly","drop-in","replacement","for","sklearn.neighbors.NearestNeighbors","(","except","for","some","parameters",")"]
docstr: Fit the HNSW model.
  
  Parameters
  ----------
  X : array-like of shape (n_samples, n_values)
  
  y: None
      Added to be compatible with Estimator API
  
  num_threads : int (default=number of CPUs)
      Number of threads for building index.
  
  report_progress : bool (default=True)
      Print progress of building.
  
  verbose : bool (default=False)
      Print additional information about time of building.
  
  snapshot_file : string (default=None)
      Path for saving snapshots during the index building.
  
  snapshot_interval : int (default=600)
      Interval between saving snapshots (seconds).
  
  Returns
  -------
  model : HnswEstimator
docstr_tok: ["Fit","the","HNSW","model",".","Parameters","--","--","--","--","--","X",":","array-like","of","shape","(","n_samples",",","n_values",")","y",":","None","Added","to","be","compatible","with","Estimator","API","num_threads",":","int","(","default=number","of","CPUs",")","Number","of","threads","for","building","index",".","report_progress",":","bool","(","default=True",")","Print","progress","of","building",".","verbose",":","bool","(","default=False",")","Print","additional","information","about","time","of","building",".","snapshot_file",":","string","(","default=None",")","Path","for","saving","snapshots","during","the","index","building",".","snapshot_interval",":","int","(","default=600",")","Interval","between","saving","snapshots","(","seconds",")",".","Returns","--","--","--","-","model",":","HnswEstimator"]
code: def fit(
      self,
      X,
      y=None,
      num_threads=None,
      verbose=False,
      report_progress=True,
      snapshot_file=None,
      snapshot_interval=600,
  ):
      """
      Fit the HNSW model.
  
      Parameters
      ----------
      X : array-like of shape (n_samples, n_values)
  
      y: None
          Added to be compatible with Estimator API
  
      num_threads : int (default=number of CPUs)
          Number of threads for building index.
  
      report_progress : bool (default=True)
          Print progress of building.
  
      verbose : bool (default=False)
          Print additional information about time of building.
  
      snapshot_file : string (default=None)
          Path for saving snapshots during the index building.
  
      snapshot_interval : int (default=600)
          Interval between saving snapshots (seconds).
  
      Returns
      -------
      model : HnswEstimator
  
      """
      self._index, self._index_data = _hnsw._init_index(
          X, self.distance
      )
  
      params = self._get_params(return_none=False)
      not_params = [
          "not_params",
          "self",
          "params",
          "__class__",
          "X",
          "y",
      ]
      for key, value in iteritems(locals()):
          if key not in not_params and value is not None:
              params[key] = value
      del params["distance"]
  
      with log_fixup():
          self._index._build(json.dumps(params))
      return self
  
imports: import sys
  import os
  from six import iteritems
  from enum import IntEnum
  from contextlib import contextmanager
  import json
label_desc: Use image node_id 3 for calling the HnswEstimator obj's underlying member method code with example usage: obj.fit(X, y, num_threads, verbose, report_progress, snapshot_file, snapshot_interval) and returns: self