-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC Specify the meaning of dict_init=None in sklearn.decomposition.dict_learning_online #23261
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
using :func:`randomized_svd` as:: | ||
|
||
_, S, dictionary = randomized_svc(X, n_components, random_state) |
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.
using :func:`randomized_svd` as:: | |
_, S, dictionary = randomized_svc(X, n_components, random_state) | |
using :func:`~sklearn.utils.randomized_svd` as:: | |
_, S, dictionary = randomized_svd(X, n_components, random_state) |
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 @marenwestermann. I think it's good to say that the initial dict is built from an svd of the data, but I don't think it's necessary to expose the corresponding lines of code.
We actually discussed it yesterday during office hours and it was my feedback as well. |
Thank you for your feedback. I updated the PR. |
Initial value for the dictionary for warm restart scenarios. | ||
Initial values for the dictionary for warm restart scenarios. | ||
If `None`, the initial values for the dictionary are created | ||
using :func:`~sklearn.utils.randomized_svd`. |
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.
using :func:`~sklearn.utils.randomized_svd`. | |
with an SVD decomposition of the data via :func:`~sklearn.utils.randomized_svd`. |
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
Reference Issues/PRs
Towards #17295
What does this implement/fix? Explain your changes.
I added documentation to the
dict_learning_online
function insklearn/decomposition/_dict_learning.py
for the casedict_init=None
.Any other comments?
In #17295 it is said that
dict_learning_online
also has the attributecode_init
which also needs further documentation. However, this is a mistake asdict_learning_online
doesn't have this attribute.