โ
Evaluation Metrics in Machine Learning ๐๐ค
Choosing the right metric helps you understand how well your model is performing. Here's what you need to know:
1๏ธโฃ Accuracy
The % of correct predictions out of all predictions.
Good for balanced datasets.
Formula: (TP + TN) / Total
Example: 90 correct out of 100 โ 90% accuracy
2๏ธโฃ Precision
Out of all predicted positives, how many were actually positive?
Good when false positives are costly.
Formula: TP / (TP + FP)
Use case: Spam detection (you donโt want to flag important emails)
3๏ธโฃ Recall (Sensitivity)
Out of all actual positives, how many were correctly predicted?
Good when false negatives are risky.
Formula: TP / (TP + FN)
Use case: Cancer detection (donโt miss positive cases)
4๏ธโฃ F1-Score
Harmonic mean of Precision and Recall.
Balances false positives and false negatives.
Formula: 2 * (Precision * Recall) / (Precision + Recall)
Use case: When data is imbalanced
5๏ธโฃ Confusion Matrix
Table showing TP, TN, FP, FN counts.
Helps you see where the model is going wrong.
6๏ธโฃ AUC-ROC
Measures how well the model separates classes.
Value ranges from 0 to 1 (closer to 1 is better).
Use case: Binary classification problems
7๏ธโฃ Mean Squared Error (MSE)
Used for regression. Penalizes larger errors.
Formula: Average of squared prediction errors
Use case: Predicting house prices, stock prices
8๏ธโฃ Rยฒ Score (R-squared)
Tells how much of the variation in the output is explained by the model.
Value: 0 to 1 (closer to 1 is better)
๐ก Always pick metrics based on your problem. Donโt rely only on accuracy!
๐ฌ Tap โค๏ธ if this helped you!
Post #3886
5.1K
- โค 13