首页 > 其他 > 详细

L1范式和L2范式的区别

时间:2015-08-25 18:32:49      阅读:717      评论:0      收藏:0      [点我收藏+]

L1 and L2 regularization add a cost to high valued weights to prevent overfitting. L1 regularization is an absolute value cost function and tends to set more weights to 0 (places more mass on zero weights) compared to L2 regularization.

 


Difference between L1 and L2
 L2 (Ridge) shrinks all the coefficient by the same proportions but eliminates none, while L1 (Lasso) can shrink some coefficients to zero, performing variable selection.

Which to use
If all the features are correlated with the label, ridge outperforms lasso, as the coefficients are never zero in ridge. If only a subset of features are correlated with the label, lasso outperforms ridge as in lasso model some coefficient can be shrunken to zero.

 

 

reference:http://www.quora.com/What-is-the-difference-between-L1-and-L2-regularization

L1范式和L2范式的区别

原文:http://www.cnblogs.com/lysuns/p/4757777.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!