-
-
Notifications
You must be signed in to change notification settings - Fork 26.5k
ENH Implement inverse_transform in DictionaryLearning, SparseCoder and MiniBatchDictionaryLearning
#30443
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
inverse_transform in DictionaryLearningand SparseCoderinverse_transform in DictionaryLearningand SparseCoder
inverse_transform in DictionaryLearningand SparseCoderinverse_transform in DictionaryLearning, SparseCoder and MiniBatchDictionaryLearning
jeremiedbb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @rflamary.
doc/whats_new/upcoming_changes/sklearn.decomposition/30443.enhancement.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Jérémie du Boisberranger <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
…n into invers_transform_dl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good thanks. One last thing we need is a dedicated test checking the error message when we pass a code with wrong shape.
EDIT: sorry just saw that it's there already :)
jeremiedbb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
|
OK I added the match in the pytest.raises. I guess the PR is OK? |
agramfort
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx @rflamary !
Reference Issues/PRs
Fixes #30442
Ping to @agramfort
What does this implement/fix? Explain your changes.
This PR implements the methods in the class
_BaseSparseCodingfrom https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/decomposition/_dict_learning.pyThe tests have also been updated to check that the reconstruction is accurate.
Any other comments?