Lasso with no intercept
5 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (5 件)
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.
0 件のコメント
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.
0 件のコメント
参考
カテゴリ
Help Center および File 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!