class_docstr: RLRMC algorithm implementation.
class_docstr_tok: ["RLRMC","algorithm","implementation","."]
docstr: Predict function of this trained model
  
  Args:
      user_input ( list or element of list ): userID or userID list
      item_input ( list or element of list ): itemID or itemID list
  
  Returns:
      list or float: list of predicted rating or predicted rating score.
docstr_tok: ["Predict","function","of","this","trained","model","Args",":","user_input","(","list","or","element","of","list",")",":","userID","or","userID","list","item_input","(","list","or","element","of","list",")",":","itemID","or","itemID","list","Returns",":","list","or","float",":","list","of","predicted","rating","or","predicted","rating","score","."]
code: def predict(self, user_input, item_input, low_memory=False):
      """Predict function of this trained model
  
      Args:
          user_input ( list or element of list ): userID or userID list
          item_input ( list or element of list ): itemID or itemID list
  
      Returns:
          list or float: list of predicted rating or predicted rating score.
      """
      # index converting
      user_input = np.array(
          [self.user2id[x] for x in user_input]
      )  # rows
      item_input = np.array(
          [self.item2id[x] for x in item_input]
      )  # columns
      num_test = user_input.shape[0]
      if num_test != item_input.shape[0]:
          print("ERROR! Dimension mismatch in test data.")
          return None
      output = np.empty(item_input.shape, dtype=np.float64)
      output.fill(-self.train_mean)
      L = self.L
      R = self.R
      if low_memory:
          # for-loop
          for i in np.arange(num_test):
              output[i] += np.dot(
                  L[user_input[i], :], R[item_input[i], :]
              )
      else:
          # matrix multiplication
          d = self.model_param.get("num_row")
          T = self.model_param.get("num_col")
          test = csr_matrix(
              (output, (user_input, item_input)), shape=(d, T)
          )
          RLRMCalgorithm._computeLoss_csrmatrix(
              L, R.T, test.data, test.indices, test.indptr, output
          )
          lin_index_org = np.ravel_multi_index(
              (user_input, item_input),
              dims=(d, T),
              mode="raise",
              order="C",
          )
          idx1 = np.argsort(lin_index_org)
          idx2 = np.argsort(idx1)
          output = output[idx2]
      return output
  
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 9 for calling the RLRMCalgorithm obj's underlying member method code with example usage: obj.predict(user_input, item_input, low_memory) and returns: output, None