Evaluation metrics practice problems

26 problems · 0 solved

A model is only as good as the way you measure it. Evaluation metrics turn predictions into numbers you can compare, but each metric hides choices about ties, averaging and edge cases that can change the result. These problems ask you to implement the common metrics yourself so you know exactly what they reward. You will build a confusion matrix, compute precision, recall and F1, compare macro and micro F1, compute ROC AUC by counting ranked pairs, build a precision recall curve with tied scores, measure calibration with expected calibration error, compute mean reciprocal rank and NDCG at k, measure rater agreement with Cohen's kappa, estimate pass@k without bias, and score generated text with ROUGE-L and sentence BLEU. Start with the Easy problems on the confusion matrix and precision, recall and F1. Then move to AUC, ranking metrics and kappa, and finish with BLEU and average precision with ties. Choosing and explaining the right metric is a core interview skill, and in real jobs a wrong metric can make a weak model look good or a strong model look broken.

Easy 8

Medium 11

Hard 7

Related topics

All practice problems