Hi Everyone, I am currently using a local ML Model...
# mlforecast
s
Hi Everyone, I am currently using a local ML Model - XGB on a single time series. I tried using AutoDifferencing parameter. It is making output go haywire(that too in wrong direction) .. But i though AutoDifferencing will help me with the series where there is trend. Why is this happening & how to rectify this in an automated way. I cant manually change parameters every time( remove autodifferencing, add auto differencing etc) Code i am using is as follows: models1 = [xgb.XGBRegressor()] fcst1 = MLForecast( models=models1, freq=freq, date_features=['year', 'month', 'quarter'], target_transforms = [AutoDifferences(max_diffs=1)], ) fcst1.fit(df, static_features=[]) prediction = fcst1.predict(h=forecast_length) Any help would be great.
j
A couple of comments: statsforecast might be a better option here. If you still want to go with ML, then you must specify a good model. Honestly I don’t know the full setup of automl, but it is not uncommon that differencing creates such unstable forecasts. You could add more lags and rolling windows manually and try to stabilise the fc like this. Also I wonder if you actually really tune the model? It more seems like you use the standard settings of xgb and run fit directly. Shouldn’t you add automl to search for good hyperparams also?
s
Hi, I am already using statsforecast, but also wanted to check how MLforecast performs. I agree that i have not tuned the model as per dataset( which i should have). Regarding hyperparameters ,Nixtla Model does a bit of optimization in choosing hyperparameters is what i remember. Will check documentation again. thanks
j
Yes, but I think you should use the automl class also and set step size, fc horizon and number of tries. I don’t see this in your current code
s
ok, will add & check, thanks