Lasso with no intercept

조회 수: 6 (최근 30일)
Ahmed ELSheikh
Ahmed ELSheikh 2012년 4월 8일
답변: Dani Klein 2020년 5월 11일
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

답변 (5개)

Dani Klein
Dani Klein 2020년 5월 11일
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 2014년 8월 17일
I want to know the answer to this as well.

Rafa Valero
Rafa Valero 2015년 10월 17일
Any answers? Please

Qiang ZHU
Qiang ZHU 2019년 1월 16일
same here

Yu Bai
Yu Bai 2020년 5월 11일
It is a bit strange as official documentation of lasso contains an "Intercept" option but actually it is not implemented.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by