Anshu Pandey
08/09/2024, 7:03 PMfcst = MLForecast(models=[LGBMRegressor(model params here)],
freq='W-Sun',
date_features=['week', 'month', 'quarter', 'year'],
lags=[1, 4, 8, 12, 52],
lag_transforms={
1: [(rolling_mean,4), (rolling_min, 4), (rolling_max, 4), (rolling_std , 4),
(rolling_mean, 8), (rolling_min,8) ,(rolling_max, 8), (rolling_std, 8),
(seasonal_rolling_mean, 12, 4),(seasonal_rolling_min, 12, 4),(seasonal_rolling_max, 12, 4),
],
},
)Below is the plot which shows all the predictions are same. But it seems that there is a pattern in the data.
José Morales
08/09/2024, 7:41 PMdropna=False
in the fit call, those lag transformations will produce many NaNs and the model will be left too few samples (you can see that by running preprocess first)Anshu Pandey
08/10/2024, 5:37 AMJosé Morales
08/12/2024, 4:10 PM