0
0
ML Pythonprogramming~5 mins

Regularization (Ridge, Lasso) in ML Python - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the main purpose of regularization in machine learning?
Regularization helps prevent overfitting by adding a penalty to the model's complexity, encouraging simpler models that generalize better to new data.
Click to reveal answer
beginner
What is Ridge regularization also known as?
Ridge regularization is also called L2 regularization because it adds the squared values of the coefficients as a penalty term to the loss function.
Click to reveal answer
intermediate
How does Lasso regularization differ from Ridge regularization?
Lasso regularization (L1) adds the absolute values of the coefficients as a penalty, which can shrink some coefficients exactly to zero, effectively selecting features.
Click to reveal answer
intermediate
What effect does increasing the regularization parameter (alpha) have on a Ridge or Lasso model?
Increasing alpha increases the penalty on coefficients, which shrinks them more towards zero, reducing model complexity but possibly increasing bias.
Click to reveal answer
intermediate
Why might you choose Lasso over Ridge regularization?
Choose Lasso when you want automatic feature selection because it can zero out less important features, making the model simpler and easier to interpret.
Click to reveal answer
What type of penalty does Ridge regularization add to the loss function?
ASum of absolute coefficients
BSum of squared coefficients
CSum of coefficients
DNo penalty
Which regularization method can shrink some coefficients exactly to zero?
ALasso
BRidge
CNeither
DBoth
What happens if you set the regularization parameter alpha to zero?
AModel ignores regularization
BModel overfits less
CModel complexity decreases
DModel uses L1 penalty
Which regularization method is better for reducing multicollinearity in features?
ALasso
BNeither
CBoth equally
DRidge
What is a common effect of too much regularization?
AOverfitting
BNo change
CUnderfitting
DPerfect fit
Explain in your own words how Ridge and Lasso regularization help improve a machine learning model.
Describe a situation where you would prefer Lasso regularization over Ridge.