Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

note 3 : another unfair comparison #24

Open
LinaMiao opened this issue Aug 14, 2012 · 0 comments
Open

note 3 : another unfair comparison #24

LinaMiao opened this issue Aug 14, 2012 · 0 comments

Comments

@LinaMiao
Copy link
Owner

% for a lasso problem, usually the latter one will stop earlier than expected

m = 120; n = 512; k = 20; % m rows, n cols, k nonzeros.
p = randperm(n); x0 = zeros(n,1); x0(p(1:k)) = sign(randn(k,1));
A = randn(m,n); [Q,R] = qr(A',0); A = Q';
b = A*x0 + 0.005 * randn(m,1);
opts.optTol = 1e-4;
opts.iterations = 20;
tau = norm(x0,1);
[x,r,g,info] = spgl1(A, b,tau,[], [], opts); % Find BP sol'n.

opts.optTol = info.rNorm;
[x,r,g,info] = spgl1(A, b, tau, [], [], opts); % Find BP sol'n.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant