class_docstr: GaussianProcessEstimator shows how to build a local time series model using
  Gaussian Processes (GP).
  
  Each time series has a GP with its own
  hyper-parameters.  For the radial basis function (RBF) Kernel, the
  learnable hyper-parameters are the amplitude and lengthscale. The periodic
  kernel has those hyper-parameters with an additional learnable frequency
  parameter. The RBFKernel is the default, but either kernel can be used by
  inputting the desired KernelOutput object. The noise sigma in the model is
  another learnable hyper-parameter for both kernels. These parameters are
  fit using an Embedding of the integer time series indices (each time series
  has its set of hyper-parameter that is static in time). The observations
  are the time series values. In this model, the time features are hour of
  the day and day of the week.
  
  Parameters
  ----------
  freq
      Time series frequency.
  prediction_length
      Prediction length.
  cardinality
      Number of time series.
  trainer
      Trainer instance to be used for model training (default: Trainer()).
  context_length
      Training length (default: None, in which case context_length =
      prediction_length).
  kernel_output
      KernelOutput instance to determine which kernel subclass to be
      instantiated (default: RBFKernelOutput()).
  params_scaling
      Determines whether or not to scale the model parameters
      (default: True).
  float_type
      Determines whether to use single or double precision
      (default: np.float64).
  max_iter_jitter
      Maximum number of iterations for jitter to iteratively make the matrix
      positive definite (default: 10).
  jitter_method
      Iteratively jitter method or use eigenvalue decomposition depending on
      problem size (default: "iter").
  sample_noise
      Boolean to determine whether to add :math:`\sigma^2I` to the predictive
      covariance matrix (default: True).
  time_features
      Time features to use as inputs of the model (default: None, in which
      case these are automatically determined based on the frequency).
  num_parallel_samples
      Number of evaluation samples per time series to increase parallelism
      during inference. This is a model optimization that does not affect the
      accuracy (default: 100).
  batch_size
      The size of the batches to be used training and prediction.
class_docstr_tok: ["GaussianProcessEstimator","shows","how","to","build","a","local","time","series","model","using","Gaussian","Processes","(","GP",")",".","Each","time","series","has","a","GP","with","its","own","hyper-parameters",".","For","the","radial","basis","function","(","RBF",")","Kernel",",","the","learnable","hyper-parameters","are","the","amplitude","and","lengthscale",".","The","periodic","kernel","has","those","hyper-parameters","with","an","additional","learnable","frequency","parameter",".","The","RBFKernel","is","the","default",",","but","either","kernel","can","be","used","by","inputting","the","desired","KernelOutput","object",".","The","noise","sigma","in","the","model","is","another","learnable","hyper-parameter","for","both","kernels",".","These","parameters","are","fit","using","an","Embedding","of","the","integer","time","series","indices","(","each","time","series","has","its","set","of","hyper-parameter","that","is","static","in","time",")",".","The","observations","are","the","time","series","values",".","In","this","model",",","the","time","features","are","hour","of","the","day","and","day","of","the","week",".","Parameters","--","--","--","--","--","freq","Time","series","frequency",".","prediction_length","Prediction","length",".","cardinality","Number","of","time","series",".","trainer","Trainer","instance","to","be","used","for","model","training","(","default",":","Trainer","(",")",")",".","context_length","Training","length","(","default",":","None",",","in","which","case","context_length","=","prediction_length",")",".","kernel_output","KernelOutput","instance","to","determine","which","kernel","subclass","to","be","instantiated","(","default",":","RBFKernelOutput","(",")",")",".","params_scaling","Determines","whether","or","not","to","scale","the","model","parameters","(","default",":","True",")",".","float_type","Determines","whether","to","use","single","or","double","precision","(","default",":","np.float64",")",".","max_iter_jitter","Maximum","number","of","iterations","for","jitter","to","iteratively","make","the","matrix","positive","definite","(","default",":","10",")",".","jitter_method","Iteratively","jitter","method","or","use","eigenvalue","decomposition","depending","on","problem","size","(","default",":","``","iter","''",")",".","sample_noise","Boolean","to","determine","whether","to","add",":","math",":","`","\\sigma^2I","`","to","the","predictive","covariance","matrix","(","default",":","True",")",".","time_features","Time","features","to","use","as","inputs","of","the","model","(","default",":","None",",","in","which","case","these","are","automatically","determined","based","on","the","frequency",")",".","num_parallel_samples","Number","of","evaluation","samples","per","time","series","to","increase","parallelism","during","inference",".","This","is","a","model","optimization","that","does","not","affect","the","accuracy","(","default",":","100",")",".","batch_size","The","size","of","the","batches","to","be","used","training","and","prediction","."]
code: def create_training_data_loader(
      self,
      data: Dataset,
      **kwargs,
  ) -> DataLoader:
      input_names = get_hybrid_forward_input_names(
          GaussianProcessTrainingNetwork
      )
      instance_splitter = self._create_instance_splitter("training")
      return TrainDataLoader(
          dataset=data,
          transform=instance_splitter + SelectFields(input_names),
          batch_size=self.batch_size,
          stack_fn=partial(
              batchify, ctx=self.trainer.ctx, dtype=self.dtype
          ),
          **kwargs,
      )
  
imports: from functools import partial
  from typing import List, Optional, Type
  import numpy
  from mxnet.gluon import HybridBlock
  from gluonts.core.component import validated
  from gluonts.dataset.common import Dataset
  from gluonts.dataset.field_names import FieldName
  from gluonts.dataset.loader import DataLoader, TrainDataLoader, ValidationDataLoader
  from gluonts.model.predictor import Predictor
  from gluonts.mx.batchify import batchify
  from gluonts.mx.kernels import KernelOutput, RBFKernelOutput
  from gluonts.mx.model.estimator import GluonEstimator
  from gluonts.mx.model.predictor import RepresentableBlockPredictor
  from gluonts.mx.trainer import Trainer
  from gluonts.mx.util import copy_parameters, get_hybrid_forward_input_names
  from gluonts.time_feature import TimeFeature, time_features_from_frequency_str
  from gluonts.transform import AddTimeFeatures, AsNumpyArray, CanonicalInstanceSplitter, SelectFields, SetFieldIfNotPresent, TestSplitSampler, Transformation
  from ._network import GaussianProcessPredictionNetwork, GaussianProcessTrainingNetwork
label_desc: Use image node_id 4 for calling the GaussianProcessEstimator obj's underlying member method code with example usage: obj.create_training_data_loader(data) and returns: TrainDataLoader