class_docstr: RLRMC algorithm implementation.
class_docstr_tok: ["RLRMC","algorithm","implementation","."]
docstr: Initialize parameters.
  
  Args:
      rank (int): rank of the final model. Should be a positive integer.
      C (float): regularization parameter. Should be a positive real number.
      model_param (dict): contains model parameters such as number of rows & columns of the matrix as well as
          the mean rating in the training dataset.
      initialize_flag (str): flag to set the initialization step of the algorithm. Current options are 'random'
          (which is random initilization) and 'svd' (which is a singular value decomposition based initilization).
      max_time (int): maximum time (in seconds), for which the algorithm is allowed to execute.
      maxiter (int): maximum number of iterations, for which the algorithm is allowed to execute.
docstr_tok: ["Initialize","parameters",".","Args",":","rank","(","int",")",":","rank","of","the","final","model",".","Should","be","a","positive","integer",".","C","(","float",")",":","regularization","parameter",".","Should","be","a","positive","real","number",".","model_param","(","dict",")",":","contains","model","parameters","such","as","number","of","rows","&","columns","of","the","matrix","as","well","as","the","mean","rating","in","the","training","dataset",".","initialize_flag","(","str",")",":","flag","to","set","the","initialization","step","of","the","algorithm",".","Current","options","are","'random'","(","which","is","random","initilization",")","and","'svd","'","(","which","is","a","singular","value","decomposition","based","initilization",")",".","max_time","(","int",")",":","maximum","time","(","in","seconds",")",",","for","which","the","algorithm","is","allowed","to","execute",".","maxiter","(","int",")",":","maximum","number","of","iterations",",","for","which","the","algorithm","is","allowed","to","execute","."]
code: def __init__(
      self,
      rank,
      C,
      model_param,
      initialize_flag="random",
      max_time=1000,
      maxiter=100,
      seed=42,
  ):
      """Initialize parameters.
  
      Args:
          rank (int): rank of the final model. Should be a positive integer.
          C (float): regularization parameter. Should be a positive real number.
          model_param (dict): contains model parameters such as number of rows & columns of the matrix as well as
              the mean rating in the training dataset.
          initialize_flag (str): flag to set the initialization step of the algorithm. Current options are 'random'
              (which is random initilization) and 'svd' (which is a singular value decomposition based initilization).
          max_time (int): maximum time (in seconds), for which the algorithm is allowed to execute.
          maxiter (int): maximum number of iterations, for which the algorithm is allowed to execute.
      """
      self.model_param = model_param
      self.train_mean = model_param.get("train_mean")
      self.initialize_flag = initialize_flag
      self.rank = rank
      self.C = C
      self.max_time = max_time
      self.maxiter = maxiter
  
imports: import numpy
  import logging
  from pymanopt import Problem
  from recommenders.models.rlrmc.conjugate_gradient_ms import ConjugateGradientMS
  from pymanopt.solvers.linesearch import LineSearchBackTracking
  from pymanopt.manifolds import Stiefel, SymmetricPositiveDefinite, Product
  from math import sqrt
  from scipy.sparse import csr_matrix
  from scipy.sparse.linalg import svds
  from numba import njit, prange
label_desc: Use image node_id 1 to create a new RLRMCalgorithm object from inherited base classes: object with example: obj = RLRMCalgorithm(rank, C, model_param, initialize_flag, max_time, maxiter, seed)