Skip to content
Advertisement

Random search grid not displaying scoring metric

I want to do a grid search of some few hyperparameters through a XGBClassifier of a binary class, but whenever i run it the score value (roc_auc) is not being display. I read in other question that this can be related to some error in model training but i am not sure which one is in this case.

My model training data X_train is a np.array of (X, 19)

enter image description here

and my y_train is a numpy.ndarray of shape (X, ) which looks like this

enter image description here

And then i create my model params and model in this way

JavaScript

Whenever i hit code from above i am seeing this display which doesnt contain the scoring

JavaScript

Advertisement

Answer

The results of the evaluations for each fold are stored in the RandomizedSearchCV instance after fitting. Access them using the cv_results_ attribute:

JavaScript

Note that you can also access the best estimator with:

JavaScript

More in the documentation of RandomizedSearchCV.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement