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

max n_nonzero_coefs #28

Closed
chapochn opened this issue Nov 13, 2021 · 3 comments
Closed

max n_nonzero_coefs #28

chapochn opened this issue Nov 13, 2021 · 3 comments

Comments

@chapochn
Copy link

Hello again,

As far as I understand from the error messages I am getting, n_nonzero_coefs should be smaller or equal than n_kernels. What is the reason for this? For example, if one wants to find similarly looking patters in a dataset.

Thanks!

@sylvchev
Copy link
Owner

Hi, this is mandatory as the sparse decomposition needs to find a decomposition on a subset of the frame elements (here kernels).

If you want to find similar looking patterns in a dataset, you could increase the number of kernels n_kernels (think of kernels as possible patterns stored in a large collection). As this collection is very large, there are multiple solution to reconstruct any input signal by combining these patterns. To make the problem tractable, it is possible to use a sparse regularization. The n_nonzero_coefs restricts the number of kernels that you could use to reconstruct an input signal.

I hope this answer your question.

@sylvchev
Copy link
Owner

I uploaded a new version on pypi (1.0.2), that correct the error you reported in #26

@chapochn
Copy link
Author

Thank you for clarifying! I will try that!

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

2 participants