class_docstr: DeepAR: Probabilistic Forecasting with Autoregressive Recurrent Networks: https://arxiv.org/abs/1704.04110
class_docstr_tok: ["DeepAR",":","Probabilistic","Forecasting","with","Autoregressive","Recurrent","Networks",":","https",":","\/\/arxiv.org\/abs\/1704.04110"]
docstr: :param n_past: # of past steps used for forecasting future.
  :param max_forecast_steps:  Max # of steps we would like to forecast for.
  :param hidden_size: hidden_size of the LSTM layers
  :param num_hidden_layers: # of hidden layers in LSTM
  :param lags_seq: Indices of the lagged observations that the RNN takes as input. For example,
      ``[1]`` indicates that the RNN only takes the observation at time ``t-1`` to produce the
      output for time ``t``.
  :param num_prediction_samples: # of samples to produce the forecasting
docstr_tok: [":","param","n_past",":","#","of","past","steps","used","for","forecasting","future",".",":","param","max_forecast_steps",":","Max","#","of","steps","we","would","like","to","forecast","for",".",":","param","hidden_size",":","hidden_size","of","the","LSTM","layers",":","param","num_hidden_layers",":","#","of","hidden","layers","in","LSTM",":","param","lags_seq",":","Indices","of","the","lagged","observations","that","the","RNN","takes","as","input",".","For","example",",","``","[","1","]","``","indicates","that","the","RNN","only","takes","the","observation","at","time","``","t-1","``","to","produce","the","output","for","time","``","t","``",".",":","param","num_prediction_samples",":","#","of","samples","to","produce","the","forecasting"]
code: def __init__(
      self,
      n_past,
      max_forecast_steps: int = None,
      hidden_size: Union[int, None] = 32,
      num_hidden_layers: int = 2,
      lags_seq: List[int] = [1],
      num_prediction_samples: int = 10,
      loss_fn: Union[str, LossFunction] = LossFunction.guassian_nll,
      **kwargs,
  ):
      """
      :param n_past: # of past steps used for forecasting future.
      :param max_forecast_steps:  Max # of steps we would like to forecast for.
      :param hidden_size: hidden_size of the LSTM layers
      :param num_hidden_layers: # of hidden layers in LSTM
      :param lags_seq: Indices of the lagged observations that the RNN takes as input. For example,
          ``[1]`` indicates that the RNN only takes the observation at time ``t-1`` to produce the
          output for time ``t``.
      :param num_prediction_samples: # of samples to produce the forecasting
      """
  
      super().__init__(
          n_past=n_past,
          max_forecast_steps=max_forecast_steps,
          loss_fn=loss_fn,
          **kwargs,
      )
  
imports: import copy
  import logging
  import math
  import numpy
  import pandas
  from typing import List, Optional, Tuple, Union
  from merlion.utils.misc import initializer
  from merlion.models.base import NormalizingConfig
  from merlion.models.deep_base import TorchModel, LossFunction
  from merlion.models.forecast.deep_base import DeepForecasterConfig, DeepForecaster
label_desc: Use image node_id 1 to create a new DeepARConfig object from inherited base classes: DeepForecasterConfig, NormalizingConfig with example: obj = DeepARConfig(n_past, max_forecast_steps, hidden_size, num_hidden_layers, lags_seq, num_prediction_samples, loss_fn)