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

some confusions when testing the source code prf_lbm.cpp #9

Open
hank9cao opened this issue Feb 21, 2017 · 0 comments
Open

some confusions when testing the source code prf_lbm.cpp #9

hank9cao opened this issue Feb 21, 2017 · 0 comments

Comments

@hank9cao
Copy link
Contributor

Hi Jiayu:

I was testing the proximal operator for the L1inf norm which lead me to test the prf_lbm.cpp.
First, it worked well, and the procedure to make sparsity is quite similar to the procedure in Sparse PCA.
But I found some source codes doesn't match the performance, here is my testing:
D=[1 2 2; 4 4 3];
tau=1;
[mu, theta , mc]=prf_lbm(D,2,3,tau);
Then

mu =

     0    0.5000    0.5000
0.5000    0.5000         0

theta =

1.5000
3.5000

The results seems quite right. But in the source code(line 94 ):
x[im+j] = (c[im+j] > theta)?(c[im+j]-theta):((c[im+j]< -theta)?(c[i*m+j]+theta):0);
when theta=1.5
mu(1,:) should be -0.5 0.5 0.5 in stead of 0 0.5000 0.5000

Please let me know, why is this?

Regards,
Hank

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