class_docstr: Alternating Least Squares
  
  A Recommendation Model based off the algorithms described in the paper 'Collaborative
  Filtering for Implicit Feedback Datasets' with performance optimizations described in
  'Applications of the Conjugate Gradient Method for Implicit Feedback Collaborative
  Filtering.'
  
  Parameters
  ----------
  factors : int, optional
      The number of latent factors to compute
  regularization : float, optional
      The regularization factor to use
  alpha : float, optional
      The weight to give to positive examples.
  dtype : data-type, optional
      Specifies whether to use 16 bit or 32 bit floating point factors
  iterations : int, optional
      The number of ALS iterations to use when fitting data
  calculate_training_loss : bool, optional
      Whether to log out the training loss at each iteration
  random_state : int, RandomState or None, optional
      The random state for seeding the initial item and user factors.
      Default is None.
  
  Attributes
  ----------
  item_factors : ndarray
      Array of latent factors for each item in the training set
  user_factors : ndarray
      Array of latent factors for each user in the training set
docstr: Incrementally updates user factors
  
  This method updates factors for users specified by userids, given a
  sparse matrix of items that they have interacted with before. This
  allows you to retrain only parts of the model with new data, and
  avoid a full retraining when new users appear - or the liked
  items for an existing user change.
  
  Parameters
  ----------
  userids : array_like
      An array of userids to calculate new factors for
  user_items : csr_matrix
      Sparse matrix containing the liked items for each user
docstr_tok: ["Incrementally","updates","user","factors","This","method","updates","factors","for","users","specified","by","userids",",","given","a","sparse","matrix","of","items","that","they","have","interacted","with","before",".","This","allows","you","to","retrain","only","parts","of","the","model","with","new","data",",","and","avoid","a","full","retraining","when","new","users","appear","-","or","the","liked","items","for","an","existing","user","change",".","Parameters","--","--","--","--","--","userids",":","array_like","An","array","of","userids","to","calculate","new","factors","for","user_items",":","csr_matrix","Sparse","matrix","containing","the","liked","items","for","each","user"]
code: def partial_fit_users(self, userids, user_items):
      """Incrementally updates user factors
  
      This method updates factors for users specified by userids, given a
      sparse matrix of items that they have interacted with before. This
      allows you to retrain only parts of the model with new data, and
      avoid a full retraining when new users appear - or the liked
      items for an existing user change.
  
      Parameters
      ----------
      userids : array_like
          An array of userids to calculate new factors for
      user_items : csr_matrix
          Sparse matrix containing the liked items for each user
      """
      if len(userids) != user_items.shape[0]:
          raise ValueError(
              "user_items must contain 1 row for every user in userids"
          )
  
      # recalculate factors for each user in the input
      user_factors = self.recalculate_user(userids, user_items)
  
      # ensure that we have enough storage for any new users
      users, factors = self.user_factors.shape
      max_userid = max(userids)
      if max_userid >= users:
          # TODO: grow exponentially ?
          self.user_factors.resize(max_userid + 1, factors)
  
      self.user_factors.assign_rows(userids, user_factors)
  
      # clear any cached properties that are invalidated by this update
      self._user_norms = self._user_norms_host = None
      self._XtX = None
  
imports: import logging
  import time
  import numpy
  from tqdm.auto import tqdm
  import implicit.gpu
  from implicit.gpu.matrix_factorization_base import MatrixFactorizationBase, check_random_state
  from implicit.utils import check_csr
label_desc: Use image node_id 5 for calling the AlternatingLeastSquares obj's underlying member method code with example usage: obj.partial_fit_users(userids, user_items) without return types