[scikit-learn] extraction of grid search values

Glenn Schultz glennmschultz at me.com
Tue Jan 5 12:24:53 EST 2021


All,

I have a grid search of gradient boosting classifier.  All works well the best model is extracted and predict works on the model.  I would like to extract the cv_results_  My set-up is pretty standard

gbclassifier = GridSearchCV(GradientBoostingClassifier(),
			parameters,
			verbose = 5,
			n_jobs = 5,
			cv = ShuffleSplit(n_splits = 5, test_size = .2, random_state = 42),
			refit = True,
			scoring = “roc_auc”)

print(gbclassifier.cv_results_) 

returns an attribute error ‘Gradient Boosting Classifier’ has no attribute cv_results.  I am not sure what I am doing wrong I checked the documentation and followed some SO examples but no progress.  I am missing something any help is appreciated.

Best,
Glenn


More information about the scikit-learn mailing list