Tutorial on how to train neuralforecast models and obtain prediction intervals using the conformal prediction methods
PredictionIntervals
class and pass this to the fit
method. By default,
PredictionIntervals
class employs n_windows=2
for the corss-validation during the
computation of conformity scores. We also train a MLP model using
DistributionLoss to demonstate the difference between conformal
prediction and quantiled outputs.
By default,
PredictionIntervals
class employs method=conformal_distribution
for the conformal
predictions, but it also supports method=conformal_error
. The
conformal_distribution
method calculates forecast paths using the
absolute errors and based on them calculates quantiles. The
conformal_error
method calculates quantiles directly from errors.
We consider two models below:
MAE
),
where we quantify the uncertainty using conformal prediction. This
case is labeled with
NHITS
.DistributionLoss('Normal')
, where we
quantify the uncertainty by training the model to fit the parameters
of a Normal distribution. This case is labeled with NHITS1
.predict
method.