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 2 : the way to set up fair comparison #21

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

Note 2 : the way to set up fair comparison #21

LinaMiao opened this issue Aug 13, 2012 · 0 comments

Comments

@LinaMiao
Copy link
Owner

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 = spgSetParms('optTol',1e-4);
opts.iterations = 20;
[x,r,g,info] = spgl1(A, b, 0, 1e-3, [], opts); % Find BP sol'n.

sigma = info.rNorm2(end);
[x,r,g,info] = spgl1(A, b, 0, sigma, [], opts); % Find BP sol'n.

% run the above code, it is unfair for the later one, simga is larger, the way of updating tau is not as aggressively as it should be.

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