docstr: Parameters
  ----------
  sigma
      Noise parameter of shape (batch_size, num_data_points, 1),
      where num_data_points is the number of rows in the Cholesky matrix.
  kernel
      Kernel object.
  prediction_length
      Prediction length.
  context_length
      Training length.
  num_samples
      The number of samples to be drawn.
  float_type
      Determines whether to use single or double precision.
  jitter_method
      Iteratively jitter method or use eigenvalue decomposition depending
      on problem size.
  max_iter_jitter
      Maximum number of iterations for jitter to iteratively make the
      matrix positive definite.
  neg_tol
      Parameter in the jitter methods to eliminate eliminate matrices
      with diagonal elements smaller than this when checking if a matrix
      is positive definite.
  diag_weight
      Multiple of mean of diagonal entries to initialize the jitter.
  increase_jitter
      Each iteration multiply by jitter by this amount
  sample_noise
      Boolean to determine whether to add :math:`\sigma^2I` to the
      predictive covariance matrix.
  F
      A module that can either refer to the Symbol API or the NDArray
      API in MXNet.
docstr_tok: ["Parameters","--","--","--","--","--","sigma","Noise","parameter","of","shape","(","batch_size",",","num_data_points",",","1",")",",","where","num_data_points","is","the","number","of","rows","in","the","Cholesky","matrix",".","kernel","Kernel","object",".","prediction_length","Prediction","length",".","context_length","Training","length",".","num_samples","The","number","of","samples","to","be","drawn",".","float_type","Determines","whether","to","use","single","or","double","precision",".","jitter_method","Iteratively","jitter","method","or","use","eigenvalue","decomposition","depending","on","problem","size",".","max_iter_jitter","Maximum","number","of","iterations","for","jitter","to","iteratively","make","the","matrix","positive","definite",".","neg_tol","Parameter","in","the","jitter","methods","to","eliminate","eliminate","matrices","with","diagonal","elements","smaller","than","this","when","checking","if","a","matrix","is","positive","definite",".","diag_weight","Multiple","of","mean","of","diagonal","entries","to","initialize","the","jitter",".","increase_jitter","Each","iteration","multiply","by","jitter","by","this","amount","sample_noise","Boolean","to","determine","whether","to","add",":","math",":","`","\\sigma^2I","`","to","the","predictive","covariance","matrix",".","F","A","module","that","can","either","refer","to","the","Symbol","API","or","the","NDArray","API","in","MXNet","."]
code: def __init__(
      self,
      sigma: Tensor,
      kernel: Kernel,
      prediction_length: Optional[int] = None,
      context_length: Optional[int] = None,
      num_samples: Optional[int] = None,
      float_type: Type = np.float64,
      jitter_method: str = "iter",
      max_iter_jitter: int = 10,
      neg_tol: float = -1e-8,
      diag_weight: float = 1e-6,
      increase_jitter: int = 10,
      sample_noise: bool = True,
      F=None,
  ) -> None:
      r"""
      Parameters
      ----------
      sigma
          Noise parameter of shape (batch_size, num_data_points, 1),
          where num_data_points is the number of rows in the Cholesky matrix.
      kernel
          Kernel object.
      prediction_length
          Prediction length.
      context_length
          Training length.
      num_samples
          The number of samples to be drawn.
      float_type
          Determines whether to use single or double precision.
      jitter_method
          Iteratively jitter method or use eigenvalue decomposition depending
          on problem size.
      max_iter_jitter
          Maximum number of iterations for jitter to iteratively make the
          matrix positive definite.
      neg_tol
          Parameter in the jitter methods to eliminate eliminate matrices
          with diagonal elements smaller than this when checking if a matrix
          is positive definite.
      diag_weight
          Multiple of mean of diagonal entries to initialize the jitter.
      increase_jitter
          Each iteration multiply by jitter by this amount
      sample_noise
          Boolean to determine whether to add :math:`\sigma^2I` to the
          predictive covariance matrix.
      F
          A module that can either refer to the Symbol API or the NDArray
          API in MXNet.
      """
      assert (
          prediction_length is None or prediction_length > 0
      ), "The value of `prediction_length` should be > 0"
      assert (
          context_length is None or context_length > 0
      ), "The value of `context_length` should be > 0"
      assert (
          num_samples is None or num_samples > 0
      ), "The value of `num_samples` should be > 0"
      self.sigma = sigma
      self.kernel = kernel
      self.prediction_length = prediction_length
      self.context_length = (
          context_length
          if context_length is not None
          else prediction_length
      )
      self.num_samples = num_samples
      self.F = F if F else getF(sigma)
      self.float_type = float_type
      self.jitter_method = jitter_method
      self.max_iter_jitter = max_iter_jitter
      self.neg_tol = neg_tol
      self.diag_weight = diag_weight
      self.increase_jitter = increase_jitter
      self.sample_noise = sample_noise
  
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 1 to create a new GaussianProcess object  with example: obj = GaussianProcess(sigma, kernel, prediction_length, context_length, num_samples, float_type, jitter_method, max_iter_jitter, neg_tol, diag_weight, increase_jitter, sample_noise, F)