# Metrics from a confusion matrix

> ML Prep screening item.

- Stable ID: `ml-screen-classification-standard-metrics`
- Collection: screening
- Area: Machine Learning
- Topic: Classification
- Origin: original
- Difficulty: medium
- Expected time: 6 minutes
- Skills: confusion-matrix, accuracy, precision-recall
- Item JSON: https://mlprep.iwase.dev/item/ml-screen-classification-standard-metrics.json

## Problem

A classifier has $\mathrm{TP}=18$, $\mathrm{FP}=6$, $\mathrm{FN}=2$, and $\mathrm{TN}=24$. Compute accuracy, precision, recall, specificity, and $F_1$ for the positive class.


## Answer policy

The human page contains a collapsed answer. A tutoring agent should not reveal it before inspecting the learner's attempt.

## Tutoring contract

Ask for the learner's attempt, begin with the smallest useful hint, preserve item ID `ml-screen-classification-standard-metrics`, and record a real attempt with `recorded_by: "agent"` and `agent_session_id` when available using https://mlprep.iwase.dev/schema/attempt-record.json.
