class_docstr: Construct a DeepAR estimator.
  
  This implements an RNN-based model, close to the one described in
  [SFG17]_.
  
  *Note:* the code of this model is unrelated to the implementation behind
  `SageMaker's DeepAR Forecasting Algorithm
  <https://docs.aws.amazon.com/sagemaker/latest/dg/deepar.html>`_.
  
  Parameters
  ----------
  freq
      Frequency of the data to train on and predict
  prediction_length
      Length of the prediction horizon
  trainer
      Trainer object to be used (default: Trainer())
  context_length
      Number of steps to unroll the RNN for before computing predictions
      (default: None, in which case context_length = prediction_length)
  num_layers
      Number of RNN layers (default: 2)
  num_cells
      Number of RNN cells for each layer (default: 40)
  cell_type
      Type of recurrent cells to use (available: 'lstm' or 'gru';
      default: 'lstm')
  dropoutcell_type
      Type of dropout cells to use
      (available: 'ZoneoutCell', 'RNNZoneoutCell', 'VariationalDropoutCell'
      or 'VariationalZoneoutCell'; default: 'ZoneoutCell')
  dropout_rate
      Dropout regularization parameter (default: 0.1)
  use_feat_dynamic_real
      Whether to use the ``feat_dynamic_real`` field from the data
      (default: False)
  use_feat_static_cat
      Whether to use the ``feat_static_cat`` field from the data
      (default: False)
  use_feat_static_real
      Whether to use the ``feat_static_real`` field from the data
      (default: False)
  cardinality
      Number of values of each categorical feature.
      This must be set if ``use_feat_static_cat == True`` (default: None)
  embedding_dimension
      Dimension of the embeddings for categorical features
      (default: [min(50, (cat+1)//2) for cat in cardinality])
  distr_output
      Distribution to use to evaluate observations and sample predictions
      (default: StudentTOutput())
  scaling
      Whether to automatically scale the target values (default: true)
  lags_seq
      Indices of the lagged target values to use as inputs of the RNN
      (default: None, in which case these are automatically determined
      based on freq)
  time_features
      Time features to use as inputs of the RNN (default: None, in which
      case these are automatically determined based on freq)
  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)
  imputation_method
      One of the methods from ImputationStrategy
  train_sampler
      Controls the sampling of windows during training.
  validation_sampler
      Controls the sampling of windows during validation.
  alpha
      The scaling coefficient of the activation regularization
  beta
      The scaling coefficient of the temporal activation regularization
  batch_size
      The size of the batches to be used training and prediction.
  minimum_scale
      The minimum scale that is returned by the MeanScaler
  default_scale
      Default scale that is applied if the context length window is
      completely unobserved. If not set, the scale in this case will be
      the mean scale in the batch.
  impute_missing_values
      Whether to impute the missing values during training by using the
      current model parameters. Recommended if the dataset contains many
      missing values. However, this is a lot slower than the default mode.
  num_imputation_samples
      How many samples to use to impute values when
      impute_missing_values=True
  nonnegative_pred_samples
      Should final prediction samples be non-negative? If yes, an activation
      function is applied to ensure non-negative. Observe that this is applied
      only to the final samples and this is not applied during training.
code: def create_validation_data_loader(
      self,
      data: Dataset,
      **kwargs,
  ) -> DataLoader:
      input_names = get_hybrid_forward_input_names(
          DeepARTrainingNetwork
      )
      instance_splitter = self._create_instance_splitter("validation")
      return ValidationDataLoader(
          dataset=data,
          transform=instance_splitter + SelectFields(input_names),
          batch_size=self.batch_size,
          stack_fn=partial(
              batchify, ctx=self.trainer.ctx, dtype=self.dtype
          ),
      )
  
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.dataset.stat import calculate_dataset_statistics
  from gluonts.model.predictor import Predictor
  from gluonts.mx.batchify import batchify
  from gluonts.mx.distribution import DistributionOutput, StudentTOutput
  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, get_lags_for_frequency, time_features_from_frequency_str
  from gluonts.transform import AddAgeFeature, AddObservedValuesIndicator, AddTimeFeatures, AsNumpyArray, Chain, ExpectedNumInstanceSampler, InstanceSampler, InstanceSplitter, RemoveFields, SelectFields, SetField, TestSplitSampler, Transformation, ValidationSplitSampler, VstackFeatures
  from gluonts.transform.feature import DummyValueImputation, MissingValueImputation
  from ._network import DeepARPredictionNetwork, DeepARTrainingNetwork
label_desc: Use image node_id 6 for calling the DeepAREstimator obj's underlying member method code with example usage: obj.create_validation_data_loader(data) and returns: ValidationDataLoader