Data Scientist
mediumds-regularization

What is regularization (L1/L2) and how does it help prevent overfitting?

Answer

Regularization adds a penalty to model complexity. - L2 (Ridge): shrinks weights, keeps all features - L1 (Lasso): can push weights to zero (feature selection) It reduces variance and improves generalization. Choose strength via validation and consider elastic net for mixed behavior.

Related Topics

RegularizationMachine LearningModeling