What is Overfitting and Underfitting in Machine Learning? How can you prevent them?

Question

can you help me with this question

Answer ( 1 )

    • Overfitting: The model learns noise from the training data and performs well on training but poorly on unseen data.
    • Underfitting: The model is too simple and fails to capture the patterns in the data, resulting in poor performance on both training and test data.

    Ways to prevent overfitting:
    ✅ Use more training data
    ✅ Apply regularization techniques (L1/L2, dropout)
    ✅ Use cross-validation
    ✅ Prune decision trees
    ✅ Use simpler models

Leave an answer