Data setup
Creating forecast object
Generate training set
UseMLForecast.preprocess
to generate the training data.
Regular training
Since we don’t want to do anything special in our training process for the linear regression, we can just callMLForecast.fit_models
MLForecast.models_ attribute.
Custom training
Now suppose you also want to train a LightGBM model on the same data, but treating the day of the week as a categorical feature and logging the train loss.Computing forecasts
Now we just assign this model to theMLForecast.models_ dictionary.
Note that you can assign as many models as you want.
MLForecast.predict,
mlforecast will use those models to compute the forecasts.

