class_docstr: Implements the IMC problem.
class_docstr_tok: ["Implements","the","IMC","problem","."]
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
  
file_path: recommenders/recommenders/models/geoimc/geoimc_algorithm.py
imports: import numpy
  from scipy.sparse import csr_matrix
  from numba import njit, prange
  from pymanopt import Problem
  from pymanopt.manifolds import Stiefel, Product, SymmetricPositiveDefinite
  from pymanopt.solvers import ConjugateGradient
  from pymanopt.solvers.linesearch import LineSearchBackTracking
label_desc: Use image node_id 3 for calling the IMCProblem obj's underlying member method code with example usage: obj._computeLoss_csrmatrix(a, b, cd, indices, indptr, residual_global) and returns: residual_global