class_docstr: A class containing functions supporting quantile, poisson and gaussian regression, to be used as a mixin for some
  `RegressionModel` subclasses.
class_docstr_tok: ["A","class","containing","functions","supporting","quantile",",","poisson","and","gaussian","regression",",","to","be","used","as","a","mixin","for","some","`","RegressionModel","`","subclasses","."]
docstr: Method intended for CatBoost's RMSEWithUncertainty loss. Returns samples
  computed from double-valued inputs [mean, variance].
  X is of shape (n_series * n_samples, n_regression_features)
docstr_tok: ["Method","intended","for","CatBoost","'s","RMSEWithUncertainty","loss",".","Returns","samples","computed","from","double-valued","inputs","[","mean",",","variance","]",".","X","is","of","shape","(","n_series","*","n_samples",",","n_regression_features",")"]
code: def _predict_normal(
      self,
      x: np.ndarray,
      num_samples: int,
      predict_likelihood_parameters: bool,
      **kwargs,
  ) -> np.ndarray:
      """Method intended for CatBoost's RMSEWithUncertainty loss. Returns samples
      computed from double-valued inputs [mean, variance].
      X is of shape (n_series * n_samples, n_regression_features)
      """
      k = x.shape[0]
  
      # model_output shape:
      # if univariate & output_chunk_length = 1: (num_samples, 2)
      # else: (2, num_samples, n_components * output_chunk_length)
      # where the axis with 2 dims is mu, sigma
      model_output = self.model.predict(x, **kwargs)
      output_dim = len(model_output.shape)
  
      # deterministic case: we return the mean only
      if num_samples == 1 and not predict_likelihood_parameters:
          # univariate & single-chunk output
          if output_dim <= 2:
              output_slice = model_output[:, 0]
          else:
              output_slice = model_output[0, :, :]
          return output_slice.reshape(k, self.pred_dim, -1)
  
      # probabilistic case
      # univariate & single-chunk output
      if output_dim <= 2:
          # embedding well shaped 2D output into 3D
          model_output = np.expand_dims(model_output, axis=0)
  
      else:
          # we transpose to get mu, sigma couples on last axis
          # shape becomes: (n_components * output_chunk_length, num_samples, 2)
          model_output = model_output.transpose()
  
      # shape (n_components * output_chunk_length, num_samples, 2)
      return model_output
  
imports: from collections import OrderedDict
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
  import numpy
  import pandas
  from sklearn.linear_model import LinearRegression
  from darts.logging import get_logger, raise_if, raise_if_not, raise_log
  from darts.models.forecasting.forecasting_model import GlobalForecastingModel
  from darts.timeseries import TimeSeries
  from darts.utils.data.tabularization import add_static_covariates_to_lagged_data, create_lagged_component_names, create_lagged_training_data
  from darts.utils.historical_forecasts import _check_optimizable_historical_forecasts_global_models, _optimized_historical_forecasts_all_points, _optimized_historical_forecasts_last_points_only, _process_historical_forecast_input
  from darts.utils.multioutput import MultiOutputRegressor
  from darts.utils.utils import _check_quantiles, get_single_series, seq2series, series2seq
label_desc: Use image node_id 7 for calling the _LikelihoodMixin obj's underlying member method code with example usage: obj._predict_normal(x, num_samples, predict_likelihood_parameters) and returns: model_output, output_slice