docstr: Test 3: Univariate VAR
docstr_tok: ["Test","3",":","Univariate","VAR"]
code: def test_univar(self):
      """
      Test 3: Univariate VAR
      """
      print("\n\n" + "*" * 50)
      print("Performing Unit Test: 'test_univar'")
      print("*" * 50 + "\n\n")
  
      automl_model = ATS(
          score_type="rmse",
          forecast_period=self.forecast_period,
          time_interval="Month",
          non_seasonal_pdq=None,
          seasonality=False,
          seasonal_period=12,
          model_type="VAR",
          verbose=0,
      )
      automl_model.fit(
          traindata=self.train_univar,
          ts_column=self.ts_column,
          target=self.target,
          cv=None,
      )
      ml_dict = automl_model.get_ml_dict()
  
      self.assertIsNone(
          automl_model.get_model_build("VAR"),
          "Expected Univar VAR model to be None but did not get None.",
      )
  
      # Simple forecast with forecast window = one used in training
      # Using named model
      test_predictions = automl_model.predict(
          forecast_period=self.forecast_period, model="VAR"
      )
      self.assertIsNone(test_predictions)
  
      # Simple forecast with forecast window != one used in training
      # Using named model
      test_predictions = automl_model.predict(
          forecast_period=10, model="VAR"
      )
      self.assertIsNone(test_predictions)
  
      # Complex forecasts (returns confidence intervals, etc.)
      test_predictions = automl_model.predict(
          forecast_period=self.forecast_period,
          model="VAR",
          simple=False,
      )
      self.assertIsNone(test_predictions)
  
      ###################
      ## ML Dictionary ##
      ###################
      self.assertEqual(
          ml_dict.get("VAR").get("forecast"),
          self.forecast_gold_var_univar,
          "(Univar Test) VAR Forecast does not match up with expected values.",
      )
  
      self.assertEqual(
          round(ml_dict.get("VAR").get("rmse"), 8),
          self.rmse_gold_var_univar,
          "(Univar Test) VAR RMSE does not match up with expected values.",
      )
  
file_path: Auto_TS/auto_ts/test/test_var.py
imports: import sys
  import os
  import unittest
  import math
  import numpy
  import pandas
  from pandas.testing import assert_series_equal
  from pandas.testing import assert_frame_equal
  from statsmodels.tsa.statespace.sarimax import SARIMAXResultsWrapper
  from auto_ts import auto_timeseries
label_desc: Use image node_id 4 for calling the TestVAR obj's underlying member method code with example usage: obj.test_univar() without return types