O'Reilly logo
  • crh92 thinks this is interesting:

predictions = grid_search.predict(X_test)
print('Accuracy:', accuracy_score(y_test, predictions))
print('Precision:', precision_score(y_test, predictions))
print('Recall:', recall_score(y_test, predictions))

From

Cover of Mastering Machine Learning with scikit-learn - Second Edition

Note

Shouldn't be in the for loop unless you want to reprint the same think over and over again for each parameter.