Usually we split the original feature and target data (X,y) in (X_train, y_train) and (X_test, y_test).
By using the method:
mae_A = cross_val_score(clf, X_train_scaled, y_train, scoring="neg_mean_absolute_error", cv=kfold)
I get the cross validation Mean Absolute Error (MAE) for the (X_train, y_train), right?
So, how can I get the MAE (from the previous cross-validation models got by using (X_train, y_train)) for the (X_test, y_test)?
Thank you very much!
Maicon P. Lourenço
cv=kfold
instead ofkfold
you use an iterable yielding (train, test) splits as arrays of indices, your model will train on train indices and produce score for test indices. – Sergey Bushmanov