Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jeremiedbb
Copy link
Member

Built on top of #19198 for convenience.

In the paper

J. Mairal, F. Bach, J. Ponce, G. Sapiro, 2009: Online dictionary learning  
for sparse coding (https://www.di.ens.fr/sierra/pdfs/icml09.pdf)

the constraint is that the norm of each atom is less or equal to 1. The current doc and implementation make it equal to 1. I'm not sure what it implies on the optimization problem but it might be considered a bug.

SparsePCA relies on dict learning and has the same issue. In the paper

R. Jenatton, G. Obozinski, F. Bach, 2009: Structured Sparse Principal Component
Analysis (https://www.di.ens.fr/~fbach/sspca_AISTATS2010.pdf)

the constraint on the components is also less or equal to 1.

This change was also proposed in #9036

Base automatically changed from master to main January 22, 2021 10:53
@ogrisel
Copy link
Member

ogrisel commented Apr 15, 2021

@jeremiedbb this PR can now be rebased on top of the main branch now that #19198 has been merged.

@ogrisel
Copy link
Member

ogrisel commented Jun 3, 2021

How does this impact qualitatively the existing examples?

Apparently no tests were impacted by this change. I am not sure this is a good sign ;)

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming it does not impact the example, fine with me but this needs to be documented in the changelog.

@jeremiedbb
Copy link
Member Author

Here's the result of the plot_faces_decomposition.py example.
before:
dl_before
after:
dl_after

there are some variations but nothing to worry I guess.

@glemaitre glemaitre changed the title Make dict learning loss match the paper FIX Make dict learning loss match the paper Oct 27, 2021
@glemaitre glemaitre added this to the 1.0.2 milestone Oct 27, 2021
@glemaitre glemaitre merged commit e773581 into scikit-learn:main Oct 27, 2021
@glemaitre
Copy link
Member

Thanks @jeremiedbb

samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Dec 24, 2021
glemaitre pushed a commit that referenced this pull request Dec 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants