0
0
ML Pythonprogramming~5 mins

Model comparison strategies in ML Python - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the main goal of model comparison in machine learning?
The main goal is to find the best model that makes the most accurate predictions on new, unseen data.
Click to reveal answer
beginner
What is cross-validation and why is it used in model comparison?
Cross-validation splits data into parts to train and test models multiple times. It helps check how well a model will perform on new data and reduces bias from a single train-test split.
Click to reveal answer
beginner
Explain the difference between training error and test error.
Training error measures mistakes on data the model learned from. Test error measures mistakes on new data. Test error shows how well the model generalizes to unseen data.
Click to reveal answer
intermediate
What is overfitting and how does it affect model comparison?
Overfitting happens when a model learns the training data too well, including noise, causing poor performance on new data. It can make a model look good during training but bad during testing.
Click to reveal answer
beginner
Name two common metrics used to compare classification models.
Accuracy and F1-score are common metrics. Accuracy measures overall correct predictions. F1-score balances precision and recall, useful when classes are imbalanced.
Click to reveal answer
Which method helps estimate model performance by splitting data multiple times?
AData augmentation
BCross-validation
CFeature scaling
DGradient descent
What does a high training accuracy but low test accuracy usually indicate?
AOverfitting
BData leakage
CGood generalization
DUnderfitting
Which metric is best when classes are imbalanced?
AF1-score
BAccuracy
CMean squared error
DR-squared
Why is it important to compare models on test data rather than training data?
ATraining data is always biased
BTraining data is noisy
CTest data is larger
DTest data shows how models perform on new data
Which strategy helps reduce bias in model performance estimates?
AIgnoring test data
BSingle train-test split
CCross-validation
DUsing only training error
Describe how cross-validation works and why it is useful for comparing models.
Explain the difference between overfitting and underfitting and how they affect model comparison.