Beginner Topic 15 of 51 AI & Machine Learning
Evaluation Metrics
Accuracy, precision, recall and F1 for classifiers.
How it works
Evaluation metrics quantify how well a model performs. For classification, accuracy is the fraction correct, precision is the share of predicted positives that are correct, recall is the share of actual positives found, F1 combines them and ROC AUC measures ranking quality across thresholds, while PR AUC suits imbalanced data. For regression, common metrics are mean absolute error, mean squared error, root mean squared error and R squared. Ranking and generation tasks use metrics such as NDCG, BLEU and perplexity.
Step-by-step walkthrough
- Accuracy is the share of correct predictions, misleading on imbalanced data.
- Precision is the share of predicted positives that are right.
- Recall is the share of actual positives that were found.
- F1 is their harmonic mean.
- Pick the metric by the cost of each kind of error.
Where it is used
Choosing the metric defines what the model optimizes in practice, such as recall for disease screening or precision for spam blocking, and is used to compare models and monitor production.
Common pitfall
Accuracy misleads on imbalanced data: predicting never fraud gives 99 percent. Optimizing a proxy metric can harm the real goal. Metrics on the test set carry uncertainty, so use confidence intervals. Align metrics with business costs of different errors and report several.
Where it fits in the course
Evaluation Metrics is topic 15 of 51 in AI & Machine Learning, rated Beginner. It follows Bias-Variance Tradeoff. The next topic is Confusion Matrix.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the AI & Machine Learning quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the AI & Machine Learning quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Evaluation Metrics?
Where do people use Evaluation Metrics?
What is the most common mistake with Evaluation Metrics?
What should I learn before this topic?
How can I practice it?
Is Evaluation Metrics hard to learn?
How long does it take to learn Evaluation Metrics?
Which topics are related to Evaluation Metrics?
What should I study after Evaluation Metrics?
Related topics
- Bias-Variance Tradeoff (AI & Machine Learning)
- Confusion Matrix (AI & Machine Learning)
- Overfitting and Underfitting (AI & Machine Learning)
- Cross-Validation (AI & Machine Learning)
- Software Metrics (Software Engineering)