class_docstr: Implements the IMC problem.
class_docstr_tok: ["Implements","the","IMC","problem","."]
docstr: Computes the euclidean gradient
  
  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: ["Computes","the","euclidean","gradient","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 _egrad(self, params, residual_global):
      """Computes the euclidean gradient
  
      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]
  
      residual_global_csr = csr_matrix(
          (residual_global, self.Y.indices, self.Y.indptr),
          shape=self.shape,
      )
  
      gradU = (
          np.dot(
              self.X.T, residual_global_csr.dot(self.Z.dot(V.dot(B.T)))
          )
          / self.nSamples
      )
  
      gradB = (
          np.dot(
              (self.X.dot(U)).T, residual_global_csr.dot(self.Z.dot(V))
          )
          / self.nSamples
          + self.lambda1 * B
      )
      gradB_sym = (gradB + gradB.T) / 2
  
      gradV = (
          np.dot(
              (self.X.dot(U.dot(B))).T, residual_global_csr.dot(self.Z)
          ).T
          / self.nSamples
      )
  
      return [gradU, gradB_sym, gradV]
  
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 5 for calling the IMCProblem obj's underlying member method code with example usage: obj._egrad(params, residual_global) and returns: list