ML Knowledge
What is the difference between Ridge and Lasso?
Data Scientist
Chime
Sprinklr
Benchling
ServiceNow
SurveyMonkey
Segment
Answers
Anonymous
3 months ago
Lasso and Ridge are both regularization methods which adds penalties to the loss function in linear regression. Ridge uses L2 norm which is the sum of the squared of the coef to penalize the coefficient while Lasso uses L1 which is the sum of the absoulte values of coefficients to penalize. Lasso can shrink coefficients towards 0 to perform feature selection while Ridge cannot. Ridge is best to use when your predictors has some collinearity, though some weak predictors but you still want to keep them all. Lasso is mainly used for feature selection, it's best to use when you have a lot of predictiors and you suspect that some of them are not relevant.
Try Our AI Interviewer
Prepare for success with realistic, role-specific interview simulations.
Try AI Interview NowInterview question asked to Data Scientists interviewing at Peloton, Adyen, Careem and others: What is the difference between Ridge and Lasso?.