What is regularization in machine learning and what do L1 and L2 regularization penalize?

Data Science with Python Medium

Data Science with Python — Medium

What is regularization in machine learning and what do L1 and L2 regularization penalize?

Key points

  • Regularization reduces overfitting by adding penalty terms
  • L1 encourages sparsity by penalizing absolute coefficients
  • L2 shrinks all coefficients by penalizing squared coefficients

Ready to go further?

Related questions