Processing math: 100%

 

 

 

Lasso Regression

For Lasso regression our cost function is

C(β)=p1i=0(yiβi)2+λp1i=0|βi|=p1i=0(yiβi)2+λp1i=0β2i,

and minimizing we have that

2p1i=0(yiβi)+λp1i=0(βi)|βi|=0,

which leads to

ˆβLassoi={yiλ2ifyi>λ2yi+λ2ifyi<λ20if|yi|λ2.

Plotting these results shows clearly that Lasso regression suppresses (sets to zero) values of βi for specific values of λ. Ridge regression reduces on the other hand the values of βi as function of λ.