docstr: Tests MIDAS on probabilistic series on example of monthly series not aligned with quarters.
docstr_tok: ["Tests","MIDAS","on","probabilistic","series","on","example","of","monthly","series","not","aligned","with","quarters","."]
code: def test_probabilistic_not_complete_monthly_to_quarterly(self):
      """
      Tests MIDAS on probabilistic series on example of monthly series not aligned with quarters.
      """
      # generate probabilistic monthly series
      all_vals_monthly = self.monthly_not_complete_ts.all_values(
          copy=False
      )
      prob_values_monthly = np.concatenate(
          [all_vals_monthly + i * 0.01 for i in range(3)], axis=2
      )
      ts_prob_monthly = TimeSeries.from_times_and_values(
          times=self.monthly_not_complete_ts.time_index,
          values=prob_values_monthly,
          columns=self.monthly_not_complete_ts.columns.tolist(),
      )
      # generate probabilistic quarterly series
      all_vals_quarterly = self.quarterly_not_complete_ts.all_values(
          copy=False
      )
      prob_values_quarterly = np.concatenate(
          [all_vals_quarterly + i * 0.01 for i in range(3)], axis=2
      )
      ts_prob_quarterly = TimeSeries.from_times_and_values(
          times=self.quarterly_not_complete_ts.time_index,
          values=prob_values_quarterly,
          columns=self.quarterly_not_complete_ts.columns.tolist(),
      )
  
      # monthly series with missing values
      midas = MIDAS(low_freq="QS", strip=False)
      quarterly_not_complete_ts_midas = midas.fit_transform(
          ts_prob_monthly
      )
      assert quarterly_not_complete_ts_midas == ts_prob_quarterly
  
      inversed_quarterly_not_complete_ts_midas = (
          midas.inverse_transform(quarterly_not_complete_ts_midas)
      )
      assert inversed_quarterly_not_complete_ts_midas == ts_prob_monthly
  
      # when strip=True we only get 1 one quarter with all 3 months
      midas = MIDAS(low_freq="QS", strip=True)
      quarterly_not_complete_ts_midas = midas.fit_transform(
          ts_prob_monthly
      )
      assert quarterly_not_complete_ts_midas == ts_prob_quarterly[1:2]
  
      inversed_quarterly_not_complete_ts_midas = (
          midas.inverse_transform(quarterly_not_complete_ts_midas)
      )
      assert (
          ts_prob_monthly[1:4]
          == inversed_quarterly_not_complete_ts_midas
      )
  
imports: import numpy
  import pandas
  import pytest
  from darts import TimeSeries
  from darts.dataprocessing.transformers import MIDAS
  from darts.models import LinearRegressionModel
  from darts.utils.timeseries_generation import generate_index, linear_timeseries
label_desc: Use image node_id 4 for calling the TestMIDAS obj's underlying member method code with example usage: obj.test_probabilistic_not_complete_monthly_to_quarterly() without return types