docstr: Model class for the model MQF2 proposed in the paper
  ``Multivariate Quantile Function Forecaster``
  by Kan, Aubet, Januschowski, Park, Benidis, Ruthotto, Gasthaus
  
  This is the multi-horizon (multivariate in time step) variant of MQF2
  
  This class is based on gluonts.torch.model.deepar.module.DeepARModel
  
  Refer to MQF2MultiHorizonEstimator for the description of parameters
docstr_tok: ["Model","class","for","the","model","MQF2","proposed","in","the","paper","``","Multivariate","Quantile","Function","Forecaster","``","by","Kan",",","Aubet",",","Januschowski",",","Park",",","Benidis",",","Ruthotto",",","Gasthaus","This","is","the","multi-horizon","(","multivariate","in","time","step",")","variant","of","MQF2","This","class","is","based","on","gluonts.torch.model.deepar.module.DeepARModel","Refer","to","MQF2MultiHorizonEstimator","for","the","description","of","parameters"]
code: def __init__(
      self,
      freq: str,
      context_length: int,
      prediction_length: int,
      num_feat_dynamic_real: int,
      num_feat_static_real: int,
      num_feat_static_cat: int,
      cardinality: List[int],
      distr_output: Optional[MQF2DistributionOutput] = None,
      embedding_dimension: Optional[List[int]] = None,
      num_layers: int = 2,
      hidden_size: int = 40,
      dropout_rate: float = 0.1,
      lags_seq: Optional[List[int]] = None,
      scaling: bool = True,
      num_parallel_samples: int = 100,
      icnn_hidden_size: int = 20,
      icnn_num_layers: int = 2,
      is_energy_score: bool = True,
      threshold_input: float = 100,
      es_num_samples: int = 50,
      estimate_logdet: bool = False,
  ) -> None:
      r"""
      Model class for the model MQF2 proposed in the paper
      ``Multivariate Quantile Function Forecaster``
      by Kan, Aubet, Januschowski, Park, Benidis, Ruthotto, Gasthaus
  
      This is the multi-horizon (multivariate in time step) variant of MQF2
  
      This class is based on gluonts.torch.model.deepar.module.DeepARModel
  
      Refer to MQF2MultiHorizonEstimator for the description of parameters
      """
  
      super().__init__(
          freq=freq,
          context_length=context_length,
          prediction_length=prediction_length,
          num_feat_dynamic_real=num_feat_dynamic_real,
          num_feat_static_real=num_feat_static_real,
          num_feat_static_cat=num_feat_static_cat,
          cardinality=cardinality,
          embedding_dimension=embedding_dimension,
          num_layers=num_layers,
          hidden_size=hidden_size,
          dropout_rate=dropout_rate,
          distr_output=(
              distr_output
              if distr_output is not None
              else MQF2DistributionOutput(prediction_length)
          ),
          lags_seq=lags_seq,
          scaling=scaling,
          num_parallel_samples=num_parallel_samples,
      )
  
      self.threshold_input = threshold_input
      self.es_num_samples = es_num_samples
  
      convexnet = PICNN(
          dim=prediction_length,
          dimh=icnn_hidden_size,
          dimc=hidden_size,
          num_hidden_layers=icnn_num_layers,
          symm_act_first=True,
      )
      deepconvexnet = DeepConvexNet(
          convexnet,
          prediction_length,
          is_energy_score=is_energy_score,
          estimate_logdet=estimate_logdet,
      )
  
      if is_energy_score:
          networks = [deepconvexnet]
      else:
          networks = [
              ActNorm(prediction_length),
              deepconvexnet,
              ActNorm(prediction_length),
          ]
  
      self.picnn = SequentialNet(networks)
  
file_path: gluonts/src/gluonts/torch/model/mqf2/module.py
imports: from typing import List, Optional
  import torch
  from gluonts.core.component import validated
  from gluonts.torch.model.deepar.module import DeepARModel
  from cpflows.flows import ActNorm
  from cpflows.icnn import PICNN
  from .distribution import MQF2DistributionOutput
  from .icnn_utils import DeepConvexNet, SequentialNet
label_desc: Use image node_id 1 to create a new MQF2MultiHorizonModel object from inherited base classes: DeepARModel with example: obj = MQF2MultiHorizonModel(freq, context_length, prediction_length, num_feat_dynamic_real, num_feat_static_real, num_feat_static_cat, cardinality, distr_output, embedding_dimension, num_layers, hidden_size, dropout_rate, lags_seq, scaling, num_parallel_samples, icnn_hidden_size, icnn_num_layers, is_energy_score, threshold_input, es_num_samples, estimate_logdet)