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

Non-negative dictionary constraint #33

Closed
jingxiaoliu opened this issue May 24, 2024 · 1 comment
Closed

Non-negative dictionary constraint #33

jingxiaoliu opened this issue May 24, 2024 · 1 comment
Assignees
Labels

Comments

@jingxiaoliu
Copy link

Hello,

Thank you for providing open access to this excellent implementation of convolutional dictionary learning.

I would like to know if sporco.dictlrn.cbpdndl supports non-negative dictionary constraint.
If it does not, could you please provide any insights on how to impose this constraint?

Best regards,
Jingxiao

@bwohlberg bwohlberg self-assigned this May 28, 2024
@bwohlberg
Copy link
Owner

There is support for non-negative coefficients, but no direct support for a non-negative dictionary. It should be relatively straightforward to implement though. Instead of using sporco.dictlrn.cbpdndl, use sporco.dictlrn.dictlrn.DictLearn, which allows one to specify the solvers for the sparse coding and dictionary update steps, as illustrated in this example script. Use one of the standard sparse coding solvers, and create your own custom dictionary update solver, which will just involve deriving a new class from one of the existing ones (e.g. sporco.admm.ccmod.ConvCnstrMOD_Consensus), overriding the ystep method to include a projection onto the non-negative orthant.

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

No branches or pull requests

2 participants