Evaluation metrics

Step 8 of 21 in Machine Learning · Build · Medium

Accuracy misleads on imbalanced data. Precision, recall, F1 and ROC-AUC show different trade-offs; pick the one that matches the cost of each error.

Build it

  1. Metrics by hand

    Confusion matrix, precision, recall, F1 and ROC-AUC by threshold sweep.

    Done when: Match sklearn.metrics.

  2. The 99% trap

    On a 99:1 dataset show an all-negative model gets 99% accuracy and 0 recall.

    Done when: You say which metric you would report.

Resources

Earn this star

On the map, you log what you built. Finish the step and its star lights.

Open this step on the map