Lasso with no intercept

6 visualizaciones (últimos 30 días)
Ahmed ELSheikh
Ahmed ELSheikh el 8 de Abr. de 2012
Respondida: Dani Klein el 11 de Mayo de 2020
Hi all, I want to use the lasso function in the statistics toolbox but with no intercept. Kind of forcing the \beta_0 to be zero. Is there an easy way to do that ? Cheers, Ahmed

Respuestas (5)

Dani Klein
Dani Klein el 11 de Mayo de 2020
I was having the same problem, and as Yu Bai mentioned, the official documentation
B = lasso(X,y,'Lambda',lambda,'Intercept',false).
It occured to me that the documentation of MATLAB R2019b did not say this. Therefore, I thought that it might be new in the 2020a version and I was right. I updated the software, implemented it, and it works. So you should consider the update.

Thomas Barrios
Thomas Barrios el 17 de Ag. de 2014
I want to know the answer to this as well.

Rafa Valero
Rafa Valero el 17 de Oct. de 2015
Any answers? Please

Qiang ZHU
Qiang ZHU el 16 de En. de 2019
same here

Yu Bai
Yu Bai el 11 de Mayo de 2020
It is a bit strange as official documentation of lasso contains an "Intercept" option but actually it is not implemented.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by