class_docstr: RLRMC algorithm implementation.
class_docstr_tok: ["RLRMC","algorithm","implementation","."]
docstr: computes residual_global = a*b - cd at given indices in csr_matrix format
docstr_tok: ["computes","residual_global","=","a","*","b","-","cd","at","given","indices","in","csr_matrix","format"]
code: def _computeLoss_csrmatrix(
      a, b, cd, indices, indptr, residual_global
  ):
      """computes residual_global = a*b - cd at given indices in csr_matrix format"""
      N = a.shape[0]
      M = a.shape[1]
      for i in prange(N):
          for j in prange(indptr[i], indptr[i + 1]):
              num = 0.0
              for k in range(M):
                  num += a[i, k] * b[k, indices[j]]
              residual_global[j] = num - cd[j]
      return residual_global
  
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 5 for calling the RLRMCalgorithm obj's underlying member method code with example usage: obj._computeLoss_csrmatrix(a, b, cd, indices, indptr, residual_global) and returns: residual_global