# Extract the best model and evaluate it on the test set best_model = grid_model_result.best_estimator_ print("Accuracy of logistic regression classifier: ", best_model.score(X_test,y_test))