[Solved] can anyone suggest to me LARS algorithm code? [closed]


make some arrays of data:

n=100
v1=rand(n,1);
v2=rand(n,1);
v3=rand(n,1);

make a linear combination of the data

Y=2*v1+3*v2+5*v3;

make a noisy matrix out of the data:

X=[v1 v2 v3];
X=X+rand(size(X))/10;

run the function

beta=lars(X, Y)

beta should be [2,3,5]

solved can anyone suggest to me LARS algorithm code? [closed]