scikit metrics: score settings
If you're going to use optimise a model in scikit-learn then it better optimise towards the right thing. This means that you have to understand metrics in scikit-learn. This series of videos will give an overview in how they work, how you can create your own and how the gridsearch interacts with it.
Here's the code to inspect
def min_recall_precision(y_true, y_pred): recall = recall_score(y_true, y_pred) precision = precision_score(y_true, y_pred) return min(recall, precision) ?make_scorer
Feedback? See an issue? Something unclear? Feel free to mention it here.
If you want to be kept up to date, consider signing up for the newsletter.