Likelihoods for StatsForecastModel#
- class darts.utils.likelihood_models.statsforecast.QuantilePrediction(quantiles)[source]#
Bases:
Likelihood,ABCQuantile 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
Returns the number of distribution parameters for a single target value.
Returns the likelihood parameter names.
Returns the likelihood type.
Methods
component_names([series, components])Generates names for the parameters of the Likelihood.
fit(model)Fits the likelihood to the model.
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(series=None, components=None)#
Generates names for the parameters of the Likelihood.
- Return type:
list[str]
- fit(model)#
Fits the likelihood to the model.
- property num_parameters: int#
Returns the number of distribution parameters for a single target value.
- property parameter_names: list[str]#
Returns the likelihood parameter names.
- 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.