title: I'm trying to create a deepVAR model and I keep running into a tuple index error in python
body: <p>The following is the code I wrote so far for my gluonts deepvar model. I'm trying to use multiple time series to make a prediction and gluonts seemed to be a good option for that. The following below is the code of what I've done so far and the error:</p>
  <pre><code>import  numpy as np   
  import  pandas as pd
  import  matplotlib.pyplot  as plt
  from gluonts.model.deepvar import DeepVAREstimator
  from gluonts.mx.distribution import GaussianOutput
  from gluonts.mx.trainer import Trainer
  from sklearn.preprocessing import MinMaxScaler
  from statsmodels.tsa.stattools import grangercausalitytests
  
  df = pd.read_csv('data_share3.csv', index_col=0, header=0, parse_dates=True)
  
  df.iloc[:200, 0].plot(figsize=(12, 5), linewidth=2)
  plt.grid()
  plt.show()
  
  from gluonts.dataset.common import ListDataset
  
  training_data = ListDataset(
      [{'start':df.index[i], 
        'target': tuple(t),
       } for t in df.values[:200, :]
         for i in range(200)],
      freq=&quot;3M&quot;  
  )
  testing_data = ListDataset(
      [{'start': df.index[i], 'target': t}  
       for t in df.values[200:227, :]
       for i in range(200, 227)],
      freq='3M'
  )
  
  
  prediction_length = 12
  
  estimator = DeepVAREstimator(freq='3M',
                              target_dim = 4000, 
                             prediction_length = prediction_length,
                             context_length = 145,
                             num_layers=2,
                             num_cells=50,
                             cell_type='lstm',
                             distr_output = GaussianOutput(),
                             dropout_rate = 0.00005, 
                             trainer=Trainer(epochs=10, 
                              learning_rate=1E-3, 
                              hybridize = True, 
                              batch_size=245,  
                              num_batches_per_epoch = 12))
  
  
  predictor=estimator.train(training_data) 
  </code></pre>
  <p>Error:</p>
  <pre><code>---------------------------------------------------------------------------
  IndexError                                Traceback (most recent call last)
  &lt;ipython-input-145-99705a50d715&gt; in &lt;module&gt;
  ----&gt; 1 predictor=estimator.train(training_data)
  
  /opt/anaconda3/lib/python3.8/site-packages/gluonts/mx/model/estimator.py in train(self, training_data, validation_data, num_workers, num_prefetch, shuffle_buffer_length, cache_data, **kwargs)
      193         **kwargs,
      194     ) -&gt; Predictor:
  --&gt; 195         return self.train_model(
      196             training_data=training_data,
      197             validation_data=validation_data,
  
  /opt/anaconda3/lib/python3.8/site-packages/gluonts/mx/model/estimator.py in train_model(self, training_data, validation_data, num_workers, num_prefetch, shuffle_buffer_length, cache_data)
      142         cache_data: bool = False,
      143     ) -&gt; TrainOutput:
  --&gt; 144         transformation = self.create_transformation()
      145 
      146         transformed_training_data = transformation.apply(training_data)
  
  /opt/anaconda3/lib/python3.8/site-packages/gluonts/model/deepvar/_estimator.py in create_transformation(self)
      340                 ExpandDimArray(
      341                     field=FieldName.TARGET,
  --&gt; 342                     axis=0 if self.distr_output.event_shape[0] == 1 else None,
      343                 ),
      344                 AddObservedValuesIndicator(
  
  IndexError: tuple index out of range
  </code></pre>
  <p>The above is the error I keep receiving. I would greatly appreciate someone's input.</p>