Why is lasso() not consistent with the answer of the normal equation?

1 次查看(过去 30 天)
Hi,
I have below. Why is B1 different to B2?
X=[1;1]
y=[2;2]
B1=inv(X'*X)*X'*y
B2=lasso(X,y,'lambda',0)
Thanks!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Problem-Based Optimization Setup 的更多信息

产品


版本

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by