Likelihoods for StatsForecast Models

class darts.utils.likelihood_models.statsforecast.QuantilePrediction(quantiles)[source]

Bases: Likelihood, ABC

Quantile Prediction Likelihood

Can be used to generate quantile predictions for any Darts model that wraps a statsforecast model.

Parameters

quantiles (list[float]) – A list of quantiles. Default: [0.01, 0.05, 0.1, 0.25, 0.5, 0.75, 0.9, 0.95, 0.99].

Attributes

num_parameters

Returns the number of distribution parameters for a single target value.

parameter_names

Returns the likelihood parameter names.

type

Returns the likelihood type.

Methods

component_names(input_series)

Generates names for the parameters of the Likelihood.

predict(model_output, num_samples)

Generates sampled or direct likelihood parameter predictions.

sample(model_output, num_samples)

Samples a prediction from the likelihood distribution and the predicted parameters.

component_names(input_series)

Generates names for the parameters of the Likelihood.

Return type

list[str]

property num_parameters: int

Returns the number of distribution parameters for a single target value.

Return type

int

property parameter_names: list[str]

Returns the likelihood parameter names.

Return type

list[str]

predict(model_output, num_samples)[source]

Generates sampled or direct likelihood parameter predictions.

Parameters
  • model_output (ndarray) – The output of the StatsForecast model.

  • num_samples (int) – Number of times a prediction is sampled from the likelihood model / distribution. If 1 and predict_likelihood_parameters=False, returns median / mean predictions.

Return type

ndarray

sample(model_output, num_samples)[source]

Samples a prediction from the likelihood distribution and the predicted parameters.

Return type

ndarray

property type: LikelihoodType

Returns the likelihood type.

Return type

LikelihoodType