class_docstr: Approximate Nearest Neighbor Search with Annoy (https://github.com/spotify/annoy).
  
  Parameters
  ----------------
  model: object: :obj:`cornac.models.Recommender`, required
      Trained recommender model which to get user/item vectors from.
  
  n_trees: int, default: 100
      The number of trees used to build index. It affects the build time and the
      index size. A larger value will give more accurate results, but larger indexes.
  
  search_k: int, default: 50
      Parameter controls the search performance and runtime. A larger value will
      give more accurate results, but will take longer time to return.
  
  num_threads: int, optional, default: -1
      Default number of threads used for building index. If num_threads = -1,
      all cores will be used.
  
  seed: int, optional, default: None
      Random seed for reproducibility.
  
  name: str, required
      Name of the recommender model.
  
  verbose: boolean, optional, default: False
      When True, running logs are displayed.
code: def __init__(
      self,
      model,
      n_trees=100,
      search_k=50,
      num_threads=-1,
      seed=None,
      name="AnnoyANN",
      verbose=False,
  ):
      super().__init__(model=model, name=name, verbose=verbose)
  
      self.n_trees = n_trees
      self.search_k = search_k
      self.num_threads = num_threads
      self.seed = seed
  
      self.index = None
      self.ignored_attrs.extend(
          [
              "index",  # will be saved separately
              "item_vectors",  # redundant after index is built
          ]
      )
  
file_path: cornac/cornac/models/ann/recom_ann_annoy.py
imports: import numpy
  from ..recommender import MEASURE_L2, MEASURE_DOT, MEASURE_COSINE
  from .recom_ann_base import BaseANN
label_desc: Use image node_id 1 to create a new AnnoyANN object from inherited base classes: BaseANN with example: obj = AnnoyANN(model, n_trees, search_k, num_threads, seed, name, verbose)