Closed webert6 closed 9 months ago
Hey @webert6, thanks for using statsforecast.
Please let us know if you have further doubts.
Thank you for the quick reply @jmoralez. I just have a couple more questions as I'm still wrapping my head around conformal prediction.
Are the conformal prediction intervals calculate differently if a forecast method has a probabilistic component?
Do you have any guidelines for selecting the proper parameters for conformal prediction?
h
must match your horizon and more windows provide a better estimate, 4 is probably fine but depending on the length of your series and your time budget you could use more or less.Regarding the first question, if the conformal prediction intervals differ if the specified model has a probabilistic output natively, I was watching this talk on conformal prediction and she mentioned combining probabilistic forecasting models with conformal prediction intervals can provide better prediction intervals than simply using conformal.
https://youtu.be/--WcrDRtrYk?si=Xc-cQRbgJ0ohoigN
Again, thank you for your help understanding.
If you want to you can define the same model twice with different settings and combine its intervals (the mean should be the same), e.g.
from statsforecast import StatsForecast
from statsforecast.models import AutoARIMA
from statsforecast.utils import AirPassengersDF, ConformalIntervals
sf = StatsForecast(
models=[
AutoARIMA(season_length=12, alias='native'),
AutoARIMA(
season_length=12,
prediction_intervals=ConformalIntervals(n_windows=4, h=12),
alias='conformal',
),
],
freq='M',
)
sf.forecast(df=AirPassengersDF, h=12, level=[80])
Great thanks! Really appreciate the responsiveness
Hello, I just want to make sure I am understanding correctly about how prediction intervals are used. I've been reading the documentation and code, but it's a bit difficult to comprehend without pulling apart the code executing it line by line.
If a list of levels is specified, the forecast method uses the native method for prediction intervals, correct?
To get conformal prediction intervals, I must specify that within the model parameters using statsforecast.utils.ConformalIntervals? But if the model method, like ADIDA, doesn't have native prediction intervals, does it automatically use conformal prediction intervals?
Are the conformal prediction intervals constant across each step of a future horizon?
Your feedback is much appreciated.