

ЁЯФ╣ 1. What is Overfitting?
ЁЯСЙ When a model learns the training data too well, including noise and unnecessary details, instead of learning the general pattern.
- Symptoms:
- Very high accuracy on training data тЬЕ
- Poor accuracy on test/unseen data тЭМ
- Technical:
- High Variance, Low Bias
тЬи Simple Example:
A decision tree grown very deep may perfectly classify training data but fails badly on new data.
ЁЯУЭ Hindi Mix:
Overfitting рддрдм рд╣реЛрддрд╛ рд╣реИ рдЬрдм model training data рдХреЗ рд╕рд╛рде-рд╕рд╛рде noise (рдЧрд╝рд▓рдд details) рднреА рд╕реАрдЦ рд▓реЗрддрд╛ рд╣реИред Training рдкрд░ рдЕрдЪреНрдЫрд╛ perform рдХрд░рддрд╛ рд╣реИ рд▓реЗрдХрд┐рди рдирдП test data рдкрд░ рдЦрд░рд╛рдмред
ЁЯФ╣ 2. What is Underfitting?
ЁЯСЙ When a model is too simple and fails to capture the underlying pattern of the data.
- Symptoms:
- Low accuracy on both training data тЭМ
- Low accuracy on test data тЭМ
- Technical:
- High Bias, Low Variance
тЬи Simple Example:
Fitting a straight line (Linear Regression) to complex, non-linear data тЖТ it misses the real pattern.
ЁЯУЭ Hindi Mix:
Underfitting рддрдм рд╣реЛрддрд╛ рд╣реИ рдЬрдм model рдмрд╣реБрдд simple (рд╕рд░рд▓) рд╣реЛ рдФрд░ data рдХрд╛ рдЕрд╕рд▓реА pattern рдкрдХрдбрд╝ рд╣реА рди рдкрд╛рдПред Training рдФрд░ Test рджреЛрдиреЛрдВ data рдкрд░ рдЦрд░рд╛рдм perform рдХрд░рддрд╛ рд╣реИред
ЁЯФ╣ 3. Difference Between Overfitting & Underfitting
Feature | Overfitting (High Variance) | Underfitting (High Bias) |
---|---|---|
Model Complexity | Too complex | Too simple |
Training Accuracy | High тЬЕ | Low тЭМ |
Test Accuracy | Low тЭМ | Low тЭМ |
Error Type | High variance error | High bias error |
Example | Deep Decision Tree | Linear model on non-linear data |
ЁЯФ╣ 4. Causes
Overfitting
- Too many features or parameters
- Model too complex
- Less training data
- Training for too long
Underfitting
- Model too simple
- Too few parameters
- Not enough training (early stopping too soon)
- Data preprocessing mistakes
ЁЯФ╣ 5. Prevention & Solutions
Preventing Overfitting
- Simplify the model (reduce depth/complexity)
- Use Regularization (Ridge = L2, Lasso = L1)
- Apply Cross-validation
- Use Early stopping (in deep learning)
- Add more training data or Data Augmentation
Preventing Underfitting
- Use a more complex model
- Train for longer (donтАЩt stop too early)
- Add more relevant features
- Reduce regularization if itтАЩs too strong
ЁЯФ╣ 6. Visual Understanding
ЁЯУЙ Underfitting (High Bias) тЖТ Model is too simple, curve doesnтАЩt fit data.
ЁЯУИ Overfitting (High Variance) тЖТ Model is too complex, curve sticks to every point.
тЪЦя╕П Good Fit (Balanced) тЖТ Model generalizes well, fits main trend without noise.
ЁЯФ╣ 7. Key Interview Definition
Overfitting тЖТ Model learns training data too well (including noise), performs well on training but poorly on test data. (High variance, low bias).
Underfitting тЖТ Model is too simple, fails to learn patterns from training data, performs poorly on both training and test data. (High bias, low variance).
тЬи Shortcut Hinglish Lines for Interview
- Overfitting:
тАЬOverfitting рддрдм рд╣реЛрддрд╛ рд╣реИ рдЬрдм model training data рдХреЛ рдЗрддрдирд╛ рдЬреНрдпрд╛рджрд╛ рдпрд╛рдж рдХрд░ рд▓реЗрддрд╛ рд╣реИ рдХрд┐ noise рднреА рд╕реАрдЦ рд▓реЗрддрд╛ рд╣реИред Result: training рдкрд░ рдЕрдЪреНрдЫрд╛, test рдкрд░ рдЦрд░рд╛рдмред High variance problem.тАЭ - Underfitting:
тАЬUnderfitting рддрдм рд╣реЛрддрд╛ рд╣реИ рдЬрдм model рдЗрддрдирд╛ simple рд╣реЛ рдХрд┐ data рдХрд╛ рдЕрд╕рд▓реА pattern рд╣реА рдирд╛ рдкрдХрдбрд╝ рдкрд╛рдПред Result: training рдФрд░ test рджреЛрдиреЛрдВ рдкрд░ рдЦрд░рд╛рдмред High bias problem.тАЭ