class_docstr: RLRMC algorithm implementation.
class_docstr_tok: ["RLRMC","algorithm","implementation","."]
code: def _egrad(
      self,
      weights,
      entries_train_csr_indices,
      entries_train_csr_indptr,
      residual_global,
  ):
      U1 = weights[0]
      U2 = weights[1]
      B = weights[2]
      U1_dot_B = np.dot(U1, B)
      residual_global_csr = csr_matrix(
          (
              residual_global,
              entries_train_csr_indices,
              entries_train_csr_indptr,
          ),
          shape=(U1.shape[0], U2.shape[0]),
      )
      residual_global_csr_dot_U2 = residual_global_csr.dot(U2)
      gradU1 = np.dot(residual_global_csr_dot_U2, B)
      gradB_asymm = (
          np.dot(U1.T, residual_global_csr_dot_U2) + self.C * B
      )
      gradB = (gradB_asymm + gradB_asymm.T) / 2.0
      gradU2 = residual_global_csr.T.dot(U1_dot_B)
      return [gradU1, gradU2, gradB]
  
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 8 for calling the RLRMCalgorithm obj's underlying member method code with example usage: obj._egrad(weights, entries_train_csr_indices, entries_train_csr_indptr, residual_global) and returns: list