-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
ENH: Allow the condition for removal of an atom to be externally set. #6385
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
Conversation
e79c1c2
to
87defa6
Compare
87defa6
to
c66b2aa
Compare
Thoughts on this? |
It looks like we need more active core devs familiar with the dictionary learning code. Sorry. Perhaps I'll find a moment to brush up. |
I agree that it seems strange for this constant to be hard-coded, but I'm also not familiar with the code. Can you explain the use-case and why this is the appropriate solution? |
To give an example, if you have very noisy data, it may occur that some of the atoms are basically reconstructing the noise in the data. Instead of keeping those noise representing atoms for repeated refinement, we would better off to reinitialize them and possibly capture a true feature of the data. Edit: Should add that was constitutes noise can vary between datasets. Hence why it would be desirable to set a different threshold here for reinitialization. |
Thanks for taking a look. 😄 |
Ping @vene. I'd like to be able to look at these PRs, @jairkham, but my unfamiliarity with dictionary learning is making me down-prioritise them within a long list of reviewing. |
Based on discussion, it sounds like this shouldn't be parameterizable. However we still would like to bump the threshold for when a basis gets tossed and reseeded from the data. The crucial point being it is better to not continue with a bad atom for too long. Please feel free to correct me if I'm missing something. |
The Based on the experiments in #19198, this refactoring has greatly improved the resampling of useless atoms and eventually the quality of the dictionary. I think that we can consider that #19198 kind of fixed this. Feel free to reopen if you think otherwise. |
Allows the threshold for when to generate a new atom for the dictionary to be set externally. Still needs tests.