π What is Model Evaluation?
Model Evaluation is the process of measuring how well a machine learning model performs on unseen data. It helps determine whether your model is accurate, reliable, and generalizes well to new inputs.
π Without evaluation, you canβt trust a model β even if it performs well during training.
π― Why Model Evaluation is Important
- π§ͺ Detects overfitting or underfitting
- π Measures accuracy and performance
- π Helps select the best model among many
- βοΈ Supports hyperparameter tuning
π Types of Evaluation Based on Task
Task | Common Metrics |
---|---|
Classification | Accuracy, Precision, Recall, F1 Score, AUC-ROC |
Regression | Mean Absolute Error (MAE), Mean Squared Error (MSE), RΒ² |
Clustering | Silhouette Score, DaviesβBouldin Index, Inertia |
β Key Metrics for Classification Models
Metric | Description |
---|---|
Accuracy | % of correct predictions (good for balanced classes) |
Precision | True Positives / (True Positives + False Positives) β focuses on relevance |
Recall | True Positives / (True Positives + False Negatives) β focuses on completeness |
F1 Score | Harmonic mean of Precision and Recall (good for imbalanced data) |
AUC-ROC | Area under the curve β measures classification confidence |
π Key Metrics for Regression Models
Metric | Description |
---|---|
MAE | Average of absolute differences between prediction and true values |
MSE / RMSE | Penalizes larger errors more heavily |
RΒ² (R-squared) | Measures how well the variance in target is explained by features |
π Train-Test Split vs Cross-Validation
Method | Use Case |
---|---|
Train/Test Split | Quick checks, typically 80/20 or 70/30 splits |
K-Fold Cross-Validation | More reliable; splits data into K parts and rotates evaluation |
Stratified K-Fold | Keeps class balance in each fold (for classification) |