Skip to content

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

Description

@hank9cao

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions