class_docstr: Interactions object. Contains (at a minimum) pair of user-item
  interactions, but can also be enriched with ratings, timestamps,
  and interaction weights.
  
  For *implicit feedback* scenarios, user ids and item ids should
  only be provided for user-item pairs where an interaction was
  observed. All pairs that are not provided are treated as missing
  observations, and often interpreted as (implicit) negative
  signals.
  
  For *explicit feedback* scenarios, user ids, item ids, and
  ratings should be provided for all user-item-rating triplets
  that were observed in the dataset.
  
  Parameters
  ----------
  
  user_ids: array of np.int32
      array of user ids of the user-item pairs
  item_ids: array of np.int32
      array of item ids of the user-item pairs
  ratings: array of np.float32, optional
      array of ratings
  timestamps: array of np.int32, optional
      array of timestamps
  weights: array of np.float32, optional
      array of weights
  num_users: int, optional
      Number of distinct users in the dataset.
      Must be larger than the maximum user id
      in user_ids.
  num_items: int, optional
      Number of distinct items in the dataset.
      Must be larger than the maximum item id
      in item_ids.
  
  Attributes
  ----------
  
  user_ids: array of np.int32
      array of user ids of the user-item pairs
  item_ids: array of np.int32
      array of item ids of the user-item pairs
  ratings: array of np.float32, optional
      array of ratings
  timestamps: array of np.int32, optional
      array of timestamps
  weights: array of np.float32, optional
      array of weights
  num_users: int, optional
      Number of distinct users in the dataset.
  num_items: int, optional
      Number of distinct items in the dataset.
class_docstr_tok: ["Interactions","object",".","Contains","(","at","a","minimum",")","pair","of","user-item","interactions",",","but","can","also","be","enriched","with","ratings",",","timestamps",",","and","interaction","weights",".","For","*","implicit","feedback","*","scenarios",",","user","ids","and","item","ids","should","only","be","provided","for","user-item","pairs","where","an","interaction","was","observed",".","All","pairs","that","are","not","provided","are","treated","as","missing","observations",",","and","often","interpreted","as","(","implicit",")","negative","signals",".","For","*","explicit","feedback","*","scenarios",",","user","ids",",","item","ids",",","and","ratings","should","be","provided","for","all","user-item-rating","triplets","that","were","observed","in","the","dataset",".","Parameters","--","--","--","--","--","user_ids",":","array","of","np.int32","array","of","user","ids","of","the","user-item","pairs","item_ids",":","array","of","np.int32","array","of","item","ids","of","the","user-item","pairs","ratings",":","array","of","np.float32",",","optional","array","of","ratings","timestamps",":","array","of","np.int32",",","optional","array","of","timestamps","weights",":","array","of","np.float32",",","optional","array","of","weights","num_users",":","int",",","optional","Number","of","distinct","users","in","the","dataset",".","Must","be","larger","than","the","maximum","user","id","in","user_ids",".","num_items",":","int",",","optional","Number","of","distinct","items","in","the","dataset",".","Must","be","larger","than","the","maximum","item","id","in","item_ids",".","Attributes","--","--","--","--","--","user_ids",":","array","of","np.int32","array","of","user","ids","of","the","user-item","pairs","item_ids",":","array","of","np.int32","array","of","item","ids","of","the","user-item","pairs","ratings",":","array","of","np.float32",",","optional","array","of","ratings","timestamps",":","array","of","np.int32",",","optional","array","of","timestamps","weights",":","array","of","np.float32",",","optional","array","of","weights","num_users",":","int",",","optional","Number","of","distinct","users","in","the","dataset",".","num_items",":","int",",","optional","Number","of","distinct","items","in","the","dataset","."]
code: def __len__(self):
      return len(self.user_ids)
  
file_path: spotlight/spotlight/interactions.py
imports: import numpy
  import scipy.sparse
label_desc: Use image node_id 3 for calling the Interactions obj's underlying member method code with example usage: obj.__len__() and returns: len