class_docstr: Defines a common interface for all recommendation models
class_docstr_tok: ["Defines","a","common","interface","for","all","recommendation","models"]
docstr: Calculates a list of similar items
  
  Parameters
  ----------
  itemid : Union[int, array_like]
      The item id or an array of item ids to retrieve similar items for
  N : int, optional
      The number of similar items to return
  recalculate_item : bool, optional
      When true, don't rely on stored item state and instead recalculate from the
      passed in item_users
  item_users : csr_matrix, optional
      A sparse matrix of shape (itemid, number_users). This lets us look
      up the users for each item. This is only needs to be set when setting
      recalculate_item=True. This should have the same number of rows as
      the itemid parameter, with the first row of the sparse matrix corresponding
      to the first item in the itemid array.
  filter_items: array_like, optional
      An array of item ids to filter out from the results being returned
  items: array_like, optional
      An array of item ids to include in the output. If not set all items in the training
      set will be included. Cannot be used with the filter_items options
  
  Returns
  -------
  tuple
      Tuple of (itemids, scores) arrays
docstr_tok: ["Calculates","a","list","of","similar","items","Parameters","--","--","--","--","--","itemid",":","Union","[","int",",","array_like","]","The","item","id","or","an","array","of","item","ids","to","retrieve","similar","items","for","N",":","int",",","optional","The","number","of","similar","items","to","return","recalculate_item",":","bool",",","optional","When","true",",","do","n't","rely","on","stored","item","state","and","instead","recalculate","from","the","passed","in","item_users","item_users",":","csr_matrix",",","optional","A","sparse","matrix","of","shape","(","itemid",",","number_users",")",".","This","lets","us","look","up","the","users","for","each","item",".","This","is","only","needs","to","be","set","when","setting","recalculate_item=True",".","This","should","have","the","same","number","of","rows","as","the","itemid","parameter",",","with","the","first","row","of","the","sparse","matrix","corresponding","to","the","first","item","in","the","itemid","array",".","filter_items",":","array_like",",","optional","An","array","of","item","ids","to","filter","out","from","the","results","being","returned","items",":","array_like",",","optional","An","array","of","item","ids","to","include","in","the","output",".","If","not","set","all","items","in","the","training","set","will","be","included",".","Can","not","be","used","with","the","filter_items","options","Returns","--","--","--","-","tuple","Tuple","of","(","itemids",",","scores",")","arrays"]
code: def similar_items(
      self,
      itemid,
      N=10,
      recalculate_item=False,
      item_users=None,
      filter_items=None,
      items=None,
  ):
      """
      Calculates a list of similar items
  
      Parameters
      ----------
      itemid : Union[int, array_like]
          The item id or an array of item ids to retrieve similar items for
      N : int, optional
          The number of similar items to return
      recalculate_item : bool, optional
          When true, don't rely on stored item state and instead recalculate from the
          passed in item_users
      item_users : csr_matrix, optional
          A sparse matrix of shape (itemid, number_users). This lets us look
          up the users for each item. This is only needs to be set when setting
          recalculate_item=True. This should have the same number of rows as
          the itemid parameter, with the first row of the sparse matrix corresponding
          to the first item in the itemid array.
      filter_items: array_like, optional
          An array of item ids to filter out from the results being returned
      items: array_like, optional
          An array of item ids to include in the output. If not set all items in the training
          set will be included. Cannot be used with the filter_items options
  
      Returns
      -------
      tuple
          Tuple of (itemids, scores) arrays
      """
  
file_path: implicit/implicit/recommender_base.py
imports: import warnings
  from abc import ABCMeta, abstractmethod
  import numpy
label_desc: Use image node_id 4 for calling the RecommenderBase obj's underlying member method code with example usage: obj.similar_items(itemid, N, recalculate_item, item_users, filter_items, items) without return types