docstr: Check that the shape of the predicted likelihood parameters match expectations, for both
  univariate and multivariate series.
  
  Note: values are not tested as it would be too time consuming
docstr_tok: ["Check","that","the","shape","of","the","predicted","likelihood","parameters","match","expectations",",","for","both","univariate","and","multivariate","series",".","Note",":","values","are","not","tested","as","it","would","be","too","time","consuming"]
code: def test_predict_likelihood_parameters_regression_models(self):
      """
      Check that the shape of the predicted likelihood parameters match expectations, for both
      univariate and multivariate series.
  
      Note: values are not tested as it would be too time consuming
      """
      seed = 142857
      n_times, n_samples = 100, 1
      model_classes = [LinearRegressionModel, XGBModel]
      if lgbm_available:
          model_classes.append(LightGBMModel)
      if cb_available:
          model_classes.append(CatBoostModel)
  
      for n_comp in [1, 3]:
          list_lkl = [
              {
                  "kwargs": {
                      "likelihood": "quantile",
                      "quantiles": [0.05, 0.50, 0.95],
                  },
                  "ts": TimeSeries.from_values(
                      np.random.normal(
                          loc=0,
                          scale=1,
                          size=(n_times, n_comp, n_samples),
                      )
                  ),
                  "expected": np.array([-1.67, 0, 1.67]),
              },
              {
                  "kwargs": {"likelihood": "poisson"},
                  "ts": TimeSeries.from_values(
                      np.random.poisson(
                          lam=4, size=(n_times, n_comp, n_samples)
                      )
                  ),
                  "expected": np.array([4]),
              },
          ]
  
          for model_cls in model_classes:
              # Catboost is the only regression model supporting the GaussianLikelihood
              if cb_available and issubclass(model_cls, CatBoostModel):
                  list_lkl.append(
                      {
                          "kwargs": {"likelihood": "gaussian"},
                          "ts": TimeSeries.from_values(
                              np.random.normal(
                                  loc=10,
                                  scale=3,
                                  size=(n_times, n_comp, n_samples),
                              )
                          ),
                          "expected": np.array([10, 3]),
                      }
                  )
  
              for lkl in list_lkl:
                  model = model_cls(
                      lags=3, random_state=seed, **lkl["kwargs"]
                  )
                  model.fit(lkl["ts"])
                  pred_lkl_params = model.predict(
                      n=1,
                      num_samples=1,
                      predict_likelihood_parameters=True,
                  )
                  if n_comp == 1:
                      assert (
                          lkl["expected"].shape
                          == pred_lkl_params.values()[0].shape
                      ), (
                          "The shape of the predicted likelihood parameters do not match expectation "
                          "for univariate series."
                      )
                  else:
                      assert (
                          1,
                          len(lkl["expected"]) * n_comp,
                          1,
                      ) == pred_lkl_params.all_values().shape, (
                          "The shape of the predicted likelihood parameters do not match expectation "
                          "for multivariate series."
                      )
  
file_path: darts/darts/tests/models/forecasting/test_probabilistic_models.py
imports: import platform
  import numpy
  import pytest
  from darts import TimeSeries
  from darts.logging import get_logger
  from darts.metrics import mae
  from darts.models import ARIMA, BATS, TBATS, CatBoostModel, ExponentialSmoothing, LightGBMModel, LinearRegressionModel, NotImportedModule, XGBModel
  from darts.tests.conftest import tfm_kwargs
  from darts.utils import timeseries_generation
label_desc: Use image node_id 5 for calling the TestProbabilisticModels obj's underlying member method code with example usage: obj.test_predict_likelihood_parameters_regression_models() without return types