class_docstr: Implements the IMC problem.
class_docstr_tok: ["Implements","the","IMC","problem","."]
docstr: Compute the cost of GeoIMC optimization problem
  
  Args:
      params (Iterator): An iterator containing the manifold point at which
      the cost needs to be evaluated.
      residual_global (csr_matrix): Residual matrix.
docstr_tok: ["Compute","the","cost","of","GeoIMC","optimization","problem","Args",":","params","(","Iterator",")",":","An","iterator","containing","the","manifold","point","at","which","the","cost","needs","to","be","evaluated",".","residual_global","(","csr_matrix",")",":","Residual","matrix","."]
code: def _cost(self, params, residual_global):
      """Compute the cost of GeoIMC optimization problem
  
      Args:
          params (Iterator): An iterator containing the manifold point at which
          the cost needs to be evaluated.
          residual_global (csr_matrix): Residual matrix.
      """
      U = params[0]
      B = params[1]
      V = params[2]
  
      regularizer = 0.5 * self.lambda1 * np.sum(B**2)
  
      IMCProblem._computeLoss_csrmatrix(
          self.X.dot(U.dot(B)),
          V.T.dot(self.Z.T),
          self.Y.data,
          self.Y.indices,
          self.Y.indptr,
          residual_global,
      )
      cost = (
          0.5 * np.sum((residual_global) ** 2) / self.nSamples
          + regularizer
      )
  
      return cost
  
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 4 for calling the IMCProblem obj's underlying member method code with example usage: obj._cost(params, residual_global) and returns: cost