docstr: Parameters
  --------------------
  kernel_matrix
      Kernel matrix of shape (batch_size, num_data_points,
      num_data_points).
  num_data_points
      Number of rows in the kernel_matrix.
  noise
      Boolean to determine whether to add :math:`\sigma^2I` to the kernel
      matrix. This is used in the predictive step if you would like to
      sample the predictive covariance matrix without noise.  It is set
      to True in every other case.
  Returns
  --------------------
  Tensor
      Cholesky factor :math:`L` of the kernel matrix with added noise
      :math:`LL^T = K + \sigma^2 I` of shape
      (batch_size, num_data_points, num_data_points).
docstr_tok: ["Parameters","--","--","--","--","--","--","--","--","--","--","kernel_matrix","Kernel","matrix","of","shape","(","batch_size",",","num_data_points",",","num_data_points",")",".","num_data_points","Number","of","rows","in","the","kernel_matrix",".","noise","Boolean","to","determine","whether","to","add",":","math",":","`","\\sigma^2I","`","to","the","kernel","matrix",".","This","is","used","in","the","predictive","step","if","you","would","like","to","sample","the","predictive","covariance","matrix","without","noise",".","It","is","set","to","True","in","every","other","case",".","Returns","--","--","--","--","--","--","--","--","--","--","Tensor","Cholesky","factor",":","math",":","`","L","`","of","the","kernel","matrix","with","added","noise",":","math",":","`","LL^T","=","K","+","\\sigma^2","I","`","of","shape","(","batch_size",",","num_data_points",",","num_data_points",")","."]
code: def _compute_cholesky_gp(
      self,
      kernel_matrix: Tensor,
      num_data_points: Optional[int] = None,
      noise: bool = True,
  ) -> Tensor:
      r"""
      Parameters
      --------------------
      kernel_matrix
          Kernel matrix of shape (batch_size, num_data_points,
          num_data_points).
      num_data_points
          Number of rows in the kernel_matrix.
      noise
          Boolean to determine whether to add :math:`\sigma^2I` to the kernel
          matrix. This is used in the predictive step if you would like to
          sample the predictive covariance matrix without noise.  It is set
          to True in every other case.
      Returns
      --------------------
      Tensor
          Cholesky factor :math:`L` of the kernel matrix with added noise
          :math:`LL^T = K + \sigma^2 I` of shape
          (batch_size, num_data_points, num_data_points).
      """
      if noise:  # Add sigma
          kernel_matrix = self.F.broadcast_plus(
              kernel_matrix,
              self.F.broadcast_mul(
                  self.sigma**2,
                  self.F.eye(num_data_points, dtype=self.float_type),
              ),
          )
      # Warning: This method is more expensive than the iterative jitter
      # but it works for mx.sym
      if self.jitter_method == "eig":
          return jitter_cholesky_eig(
              self.F,
              kernel_matrix,
              num_data_points,
              self.float_type,
              self.diag_weight,
          )
      elif self.jitter_method == "iter" and self.F is mx.nd:
          return jitter_cholesky(
              self.F,
              kernel_matrix,
              num_data_points,
              self.float_type,
              self.max_iter_jitter,
              self.neg_tol,
              self.diag_weight,
              self.increase_jitter,
          )
      else:
          return self.F.linalg.potrf(kernel_matrix)
  
file_path: gluonts/src/gluonts/mx/model/gp_forecaster/gaussian_process.py
imports: from typing import Optional, Tuple, Type
  import mxnet
  import numpy
  from gluonts.mx import Tensor
  from gluonts.mx.distribution import MultivariateGaussian
  from gluonts.mx.distribution.distribution import getF
  from gluonts.mx.kernels import Kernel
  from gluonts.mx.linalg_util import batch_diagonal, jitter_cholesky, jitter_cholesky_eig
label_desc: Use image node_id 2 for calling the GaussianProcess obj's underlying member method code with example usage: obj._compute_cholesky_gp(kernel_matrix, num_data_points, noise) and returns: jitter_cholesky_eig, jitter_cholesky, self