class_docstr: Defines a Gluon block used for GP training and predictions.
class_docstr_tok: ["Defines","a","Gluon","block","used","for","GP","training","and","predictions","."]
docstr: This function returns the GP hyper-parameters for the model.
  
  Parameters
  ----------
  F
      A module that can either refer to the Symbol API or the NDArray
      API in MXNet.
  past_target
      Training time series values of shape (batch_size, context_length).
  past_time_feat
      Training features of shape (batch_size, context_length,
      num_features).
  feat_static_cat
      Time series indices of shape (batch_size, 1).
  
  Returns
  -------
  Tuple
      Tuple of kernel hyper-parameters of length num_hyperparams.
          Each is a Tensor of shape (batch_size, 1, 1).
      Model noise sigma.
          Tensor of shape (batch_size, 1, 1).
docstr_tok: ["This","function","returns","the","GP","hyper-parameters","for","the","model",".","Parameters","--","--","--","--","--","F","A","module","that","can","either","refer","to","the","Symbol","API","or","the","NDArray","API","in","MXNet",".","past_target","Training","time","series","values","of","shape","(","batch_size",",","context_length",")",".","past_time_feat","Training","features","of","shape","(","batch_size",",","context_length",",","num_features",")",".","feat_static_cat","Time","series","indices","of","shape","(","batch_size",",","1",")",".","Returns","--","--","--","-","Tuple","Tuple","of","kernel","hyper-parameters","of","length","num_hyperparams",".","Each","is","a","Tensor","of","shape","(","batch_size",",","1",",","1",")",".","Model","noise","sigma",".","Tensor","of","shape","(","batch_size",",","1",",","1",")","."]
code: def get_gp_params(
      self,
      F,
      past_target: Tensor,
      past_time_feat: Tensor,
      feat_static_cat: Tensor,
  ) -> Tuple:
      """
      This function returns the GP hyper-parameters for the model.
  
      Parameters
      ----------
      F
          A module that can either refer to the Symbol API or the NDArray
          API in MXNet.
      past_target
          Training time series values of shape (batch_size, context_length).
      past_time_feat
          Training features of shape (batch_size, context_length,
          num_features).
      feat_static_cat
          Time series indices of shape (batch_size, 1).
  
      Returns
      -------
      Tuple
          Tuple of kernel hyper-parameters of length num_hyperparams.
              Each is a Tensor of shape (batch_size, 1, 1).
          Model noise sigma.
              Tensor of shape (batch_size, 1, 1).
      """
      output = self.embedding(
          feat_static_cat.squeeze()
      )  # Shape (batch_size, num_hyperparams + 1)
      kernel_args = self.proj_kernel_args(output)
      sigma = softplus(
          F,
          output.slice_axis(  # sigma is the last hyper-parameter
              axis=1,
              begin=self.num_hyperparams,
              end=self.num_hyperparams + 1,
          ),
      )
      if self.params_scaling:
          scalings = self.kernel_output.gp_params_scaling(
              F, past_target, past_time_feat
          )
          sigma = F.broadcast_mul(sigma, scalings[self.num_hyperparams])
          kernel_args = (
              F.broadcast_mul(kernel_arg, scaling)
              for kernel_arg, scaling in zip(
                  kernel_args, scalings[0 : self.num_hyperparams]
              )
          )
      min_value = 1e-5
      max_value = 1e8
      kernel_args = (
          kernel_arg.clip(min_value, max_value).expand_dims(axis=2)
          for kernel_arg in kernel_args
      )
      sigma = sigma.clip(min_value, max_value).expand_dims(axis=2)
      return kernel_args, sigma
  
file_path: gluonts/src/gluonts/mx/model/gp_forecaster/_network.py
imports: from typing import Tuple, Type
  import mxnet
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.distribution.distribution import softplus
  from gluonts.mx.kernels import KernelOutputDict
  from .gaussian_process import GaussianProcess
label_desc: Use image node_id 2 for calling the GaussianProcessNetworkBase obj's underlying member method code with example usage: obj.get_gp_params(F, past_target, past_time_feat, feat_static_cat) and returns: kernel_args,  sigma