Hello,
I have been going around in circles for hours on this error in question 4: Inputs contains NaN.
I tried with just one fold with a fit method it’s the same problem.
I reread the forum questions but … I loop.
Here is an extract
categorical_transformer = OrdinalEncoder()
numerical_transformer = SimpleImputer()
preprocessor = ColumnTransformer(transformers = [
('ordinal-encoder', categorical_transformer, categorical_columns),
('standard-scaler', numerical_transformer, numerical_columns)])
model_global = make_pipeline(preprocessor, DecisionTreeRegressor(random_state=0))
cv_results_global = cross_validate(model_global, data, target, cv = 10,
return_train_score=True,error_score="raise")
Thank you for help.