Makarand Batchu
03/28/2024, 11:15 AMPredictionIntervals
for my mlforecast model to get prediction intervals. Can someone please explain how to choose the h
and n_windows
values since it seems to be different from cross-validation?
I am having a training dataset of 63 days and wish to predict for a horizon on 31 days. I am using the below models and when I set prediction_intervals=PredictionIntervals(h=10, n_windows=2)
, .fit()
fails with an error that
ValueError: Found array with 0 sample(s) (shape=(0, 6)) while a minimum of 1 is required by KNeighborsRegressor.
models = {
'KNeighborsRegressor': KNeighborsRegressor(),
'Lasso': Lasso(),
'LinearRegression': LinearRegression(),
'MLPRegressor': MLPRegressor(),
'Ridge': Ridge(),
'DT': DecisionTreeRegressor(),
'avg': lgb.LGBMRegressor(**lgb_params),
'q75': lgb.LGBMRegressor(**lgb_params, objective='quantile', alpha=0.75),
'q25': lgb.LGBMRegressor(**lgb_params, objective='quantile', alpha=0.25)
}
José Morales
03/28/2024, 2:44 PMMakarand Batchu
03/28/2024, 2:46 PMJosé Morales
03/28/2024, 3:29 PMRollingMean(window_size=31, min_samples=1)
Makarand Batchu
03/28/2024, 3:38 PMJosé Morales
03/28/2024, 3:40 PM