# mlforecast


10/18/2023, 1:36 PM
When I try to run the ML crossvalidation I get the following error, specially when including the RandomForestRegresor:
Copy code
alueError: Input X contains NaN.
RandomForestRegressor does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See <> You can find a list of all estimators that handle NaN values at the following page: <>
Its strange because my train_agg already has imputed values. Can anyone help me resolve this?