Adds the as_numpy argument to MLForecast.preprocess, MLForecast.fit and MLForecast.cross_validation which will cast the features (X) to numpy before passing them to the models. The benefit of using this argument can be twofold:
Models can usually be trained faster on numpy arrays, so for scikit-learn models for example this should make the training faster through MLForecast.fit.
Since some libraries don't support categorical features with polars yet, in order to use them we have to cast them to their integer representation and provide an argument to the library to indicate that those features should be treated as categoricals (an example will be added to the docs).
Checklist:
[x] This PR has a meaningful title and a clear description.
Description
Adds the
as_numpy
argument toMLForecast.preprocess
,MLForecast.fit
andMLForecast.cross_validation
which will cast the features (X) to numpy before passing them to the models. The benefit of using this argument can be twofold:MLForecast.fit
.Checklist: