8000 DOC specify the meaning of W=None and H=None in sklearn.decomposition.non_negative_factorization by marenwestermann · Pull Request #25770 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC specify the meaning of W=None and H=None in sklearn.decomposition.non_negative_factorization #25770

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

Merged

Conversation

marenwestermann
Copy link
Member
@marenwestermann marenwestermann commented Mar 6, 2023

Reference Issues/PRs

towards #17295

What does this implement/fix? Explain your changes.

Adds documentation to non_negative_factorization and _fit_transform in sklearn/decomposition/_nmf.py for cases W=None and H=None. Also adds documentation for W when update_H=False.

Any other comments?

#PyladiesBerlin sprint

Copy link
Member
@jeremiedbb jeremiedbb left a 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 worth updating the docstrings of the public fit_transform as well (the not update_H does not apply there though). Can you also update the docstring of fit_transform in MiniBatchNMF.

Another thing that is worth mentioning imo is that when init="custom", both W and H must be provided, in the description of the init parameter in both classes and in non_negative_factorization.

@marenwestermann
Copy link
Member Author

Thanks for your review @jeremiedbb. I updated the PR.

Copy link
Member
@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

LGTM, just a few nitpicks left

@marenwestermann
Copy link
Member Author

Done. I also added back ticks to lines 969 and 970.

@jeremiedbb jeremiedbb merged commit a70954d into scikit-learn:main Mar 8, 2023
@jeremiedbb
Copy link
Member

Thanks

@marenwestermann marenwestermann deleted the non-negative-factorization branch March 9, 2023 08:12
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.

2 participants
0