-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
[MRG] Online implementation of non-negative matrix factorization #16948
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
glemaitre
merged 349 commits into
scikit-learn:main
from
cmarmo:modified_nmf_for_minibatch
Apr 22, 2022
Merged
Changes from all commits
Commits
Show all changes
349 commits
Select commit
Hold shift + click to select a range
3694255
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 97082c7
Sum batch iterations to iterations.
cmarmo 5cc9949
Debugging.
cmarmo e852ad2
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 7d75d30
Debug
cmarmo 753e6f6
Some improvements.
cmarmo cd28014
Add hardcoded forgetting factor.
cmarmo 88fc02c
Sync with upstream.
cmarmo d5ad09a
Fix index.
cmarmo 6b8969f
Various testing.
cmarmo 2a7d316
Same results for NMF and onlineNMF for batch_size=n_samples.
cmarmo 09e50e3
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 172d097
Linting.
cmarmo 921bd33
Linting in benchmarks.
cmarmo 03867c2
Fix number of iterations.
cmarmo f58900c
Clean parameters.
cmarmo e2be821
Remove transform and inverse_transform function.
cmarmo 0020eb6
Fix references.
cmarmo 05d6010
Add tests.
cmarmo 8c7a3fb
Fix lint errors in tests.
cmarmo e4c1e23
Add one more test.
cmarmo 6b930d9
Fix import.
cmarmo 4c8bf0a
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 8f54700
Remove duplicated code.
cmarmo 6b99b95
Lint.
cmarmo 34778ab
Fix indentation.
cmarmo df4ec4e
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 7679e3d
Fix indentation.
cmarmo 44fa3bf
Fix docstring example.
cmarmo fcde447
Add forget_factor as parameter.
cmarmo 749d59a
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 51f763c
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo bebde14
Fix partial_fit function (hopefully). Adapt benchmarks.
cmarmo e1794a8
Linting.
cmarmo 3104d5e
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 00574c7
Bench with n_traing greater than n_test.
cmarmo 898b590
Try to avoid SyntaxError in import.
cmarmo 8b4de0d
Try to avoid SyntaxError in import (again).
cmarmo 8379b53
Try to avoid SyntaxError in import (last one?).
cmarmo e7b5ec7
Try to avoid SyntaxError in import?
cmarmo 9909247
Try to avoid SyntaxError in import?
cmarmo 0e0bf23
Add sample variation.
cmarmo e140b4d
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo e243df9
Linting.
cmarmo c42c499
Set forget_factor default to 0.7. Add some doc. Add MiniBatchNMF to A…
cmarmo f2017f5
Test.
cmarmo b7a4555
Test.
cmarmo 164183f
Remove failing file for now.
cmarmo 21b6413
Fix sphinx warning.
cmarmo 5053538
Add test for partial_fit. Fix output number of iterations.
cmarmo 0cbeb10
Lintgit push origin modified_nmf_for_minibatch !
cmarmo 5882a19
Lint and refactor.
cmarmo 7b959d4
Lint.
cmarmo f103131
Tentative test for auxiliary matrices.
cmarmo 8e06593
Lint.
cmarmo a09aee3
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 60d058f
Better test for auxiliary matrices.
cmarmo d277dcd
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 39357b0
Address comments.
cmarmo ec687c6
Add docstring for _multiplicative_update_h.
cmarmo e0c25e2
Remove shuffle in MiniBatchNMF partial_fit.
cmarmo 4f23406
Tentatively reverting benchmarks.
cmarmo 825d6dd
Address some of the comments.
cmarmo 936cdcc
Address some of the comments.
cmarmo 7c13c85
Inherit MiniBatch NMF from NMF.
cmarmo 66ae8c0
Lint.
cmarmo 4b03d60
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 70ca165
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 0a9b7a1
Documentation.
cmarmo 384c4c2
Increase iterations for MiniBatchNMF common tests.
cmarmo 40a638d
Remove unexplained failing file to allow documentation build.
cmarmo 1f4966f
Add validation for batch_size.
cmarmo 77b7e5f
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 4d75a3e
Remove f-string for python 3.6 compatibility.
cmarmo a1be937
Fix conflicts.
cmarmo 0268bb8
Fix some more conflicts.
cmarmo 114d55f
Generalize test to minibatchnmf.
cmarmo 12c33d1
Lint and forgotten tests.
cmarmo a8f660e
Fix call.
cmarmo ab73275
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 4d50010
Make all tests pass (thanks Jeremie).
cmarmo dc2af80
Fix messages and FutureWarning (again).
cmarmo 7994110
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 3eaf438
Add iter_offset_ .
cmarmo b59c32a
Lint.
cmarmo 896efa5
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo b9ca59b
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 602ce53
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 3fdcec0
Apply suggestions from code review
cmarmo 964dad8
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo af95de9
Address comments.
cmarmo bded3d4
Update tests.
cmarmo 386c8bc
Merge with master.
cmarmo 3f41280
Address some comments.
cmarmo f215c33
Apply suggestions from code review
cmarmo 7b91764
Lint.
cmarmo 34ada71
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo a234186
Address more comments.
cmarmo dae9012
Test batch_size lt n_samples. Fix lint.
cmarmo d02399a
Parametrize the nmf close to MBnmf test.
cmarmo 98c569b
Sets assume_finite in MiniBatchNMF (see discussions in #18581).
cmarmo 2256926
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo dd66685
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 96545a6
Add back benchmark script.
cmarmo e33e166
Add new test on test sample.
cmarmo 53c1398
Optimize transform parameters in partial_fit.
cmarmo 1726b00
Fix indentation of iter_offset. Check convergence every iteration.
cmarmo 4749f7f
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 27f5640
Set max_iter to self.max_iter in partial_fit.
cmarmo a6adcaa
Remove debug relics. Add comment on batch_size.
cmarmo c253588
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 89fcf7c
Merge branch 'master' into modified_nmf_for_minibatch
cmarmo 8d1bdf9
Generalise norm notation in docstring.
cmarmo 6da0cd2
Throw an error when batch_size is not None and loss=frobenius. Reorga…
cmarmo 7ba62fe
Fix tests (the fixable one).
cmarmo bfc07f1
Add batch size in mbnmf transform function.
cmarmo c632d81
Experimenting with iterations.
cmarmo 0e3e23c
Updating bench scripts.
cmarmo 0a203d0
Updating bench scripts.
cmarmo 2befe59
Merge branch 'main' into modified_nmf_for_minibatch
cmarmo 378fbe0
Revert n_iter.
cmarmo 02ea2ff
Add a loop for W (tentative).
cmarmo d6784db
Fix lint.
cmarmo 144ce91
Fix one test.
cmarmo c5f6b6b
Merge branch 'main' into modified_nmf_for_minibatch
cmarmo c629e83
Revert unuseful iterations on W.
cmarmo 1df2415
Remove condition on batch_size gt n_samples.
cmarmo 9ddeeef
Return H from multiplicative_update_H.
cmarmo 6dad778
Some adjustements in tests.
cmarmo 2e8b7d4
Merge branch 'main' into modified_nmf_for_minibatch
cmarmo 673052a
Fix auxiliary functions manipulations.
cmarmo c59e325
Remove explicit calls to auxiliary matrices. Initialize them at each …
cmarmo 885b8dd
Fix lint errors.
cmarmo 616d01a
Start reformatting the iteration loop.
cmarmo 97d5dda
Merge branch 'main' into modified_nmf_for_minibatch
cmarmo 4782e63
Return iter_offset.
cmarmo 86a5c22
Merge branch 'main' into modified_nmf_for_minibatch
cmarmo 73c50a8
Working on tests and iterations.
cmarmo a83cbd5
Fix lint error.
cmarmo 4107137
Fix common tests.
cmarmo c2b6919
Fix linting error.
cmarmo 47dd275
Merge branch 'main' into modified_nmf_for_minibatch
cmarmo 1de5e35
Merge branch 'main' into modified_nmf_for_minibatch
cmarmo dc70492
Allow all losses in MiniBatchNMF.
cmarmo db2b7ad
Allow batch_size= n_samples in mbNMF.
cmarmo d5172fc
reformat number of iterations.
cmarmo 0649073
Fix lint.
cmarmo c83ba3f
Merge with upstream and start refactoring.
cmarmo 784cf5f
Fix lint errors.
cmarmo 68ede97
Apply reviewer comments.
cmarmo 8611f09
Address some comment. Fix bad dtype in MiniBatchNMF.
cmarmo 0e00c2a
Fix lint.
cmarmo ade8273
Merge branch 'main' into modified_nmf_for_minibatch
cmarmo 1df45b4
generalize function parameters in test.
cmarmo 961c2cb
Improve test on partial_fit, fix iteration number.
cmarmo 3b2b442
Compute iter_offset.
cmarmo b48d1dc
Fix iteration number and intitialization in tests.
cmarmo 8af4d32
Merge branch 'main' into modified_nmf_for_minibatch
cmarmo cce2e7e
Reworking iterations, fix some tests.
cmarmo d55dc99
Minor adjustments.
cmarmo 52f41fa
Refactor tests.
cmarmo 805f21c
Add a test for reconstruction.
cmarmo 93782e4
Merge branch 'main' into modified_nmf_for_minibatch
cmarmo da88b2f
Address some sommeents.
cmarmo 5b9531b
Merge with main.
cmarmo 049368a
Simplify tests.
cmarmo 7914e9d
Fix lint errors.
cmarmo 603ce83
Add MiniBatchNMF to the example about topics extraction.
cmarmo 9abe904
Merge branch 'main' into modified_nmf_for_minibatch
cmarmo 3c50aff
Remove obsolete benchmark script.
cmarmo 7085842
Fix sphinx warning.
cmarmo ed3e13a
True fix sphinx warning.
cmarmo fc2456b
Use _fit_transform instead of transform in partial_fit.
cmarmo f1d1e75
Fix partial_fit.
cmarmo cf50558
Increase iteration number in common tests.
cmarmo 66a4c70
Merge branch 'master' into modified_nmf_for_minibatch
jeremiedbb 762c27f
Sync with main and update test on error messages.
cmarmo e7b727a
Address some comments.
cmarmo decbca8
Cast ceil output.
cmarmo d8048f7
Fix lint error.
cmarmo 8941e6c
Address comment.
cmarmo 1185388
Merge branch 'master' into modified_nmf_for_minibatch
jeremiedbb e0a5ff5
Merge branch 'modified_nmf_for_minibatch' of https://github.com/cmarm…
jeremiedbb 5668353
Import the black config and deal with existing merge conflicts before…
cmarmo c2c13a0
MAINT Adds target_version to black config (#20293)
thomasjpfan 492efd9
Format code with black.
cmarmo 48c2213
Merge with upstream.
cmarmo 51274d0
Fix forgotten conflict.
cmarmo 40d0b36
Fix more forgotten conflicts.
cmarmo 500e526
wip
jeremiedbb 1dbcc52
Merge branch 'modified_nmf_for_minibatch' of https://github.com/cmarm…
jeremiedbb ad39359
black
jeremiedbb 47b5f88
wip
jeremiedbb 68f0e48
black
jeremiedbb 352fd19
Merge branch 'master' into modified_nmf_for_minibatch
jeremiedbb 52863f7
black
jeremiedbb 547ce68
cln
jeremiedbb b0471ad
cln
jeremiedbb e83b97d
Merge branch 'master' into modified_nmf_for_minibatch
jeremiedbb 2ba0e96
cln + regularization
jeremiedbb 61f3c93
Merge branch 'master' into modified_nmf_for_minibatch
jeremiedbb 25be104
pass numpydoc val
jeremiedbb 4561e9f
wip
jeremiedbb fb98339
Merge branch 'master' into modified_nmf_for_minibatch
jeremiedbb 446ce3c
iter
jeremiedbb 620a065
whats new
jeremiedbb 8f16bbe
black
jeremiedbb ec31b65
black
jeremiedbb 8194068
cln
jeremiedbb 7b721c3
cln
jeremiedbb 198afe2
cln
jeremiedbb b30e3b7
cln
jeremiedbb 06a3342
iter
jeremiedbb a6ff0e9
cln doc
jeremiedbb 7e33d60
improve coverage
jeremiedbb 54e1ad7
black
jeremiedbb d22da5f
Merge branch 'master' into modified_nmf_for_minibatch
jeremiedbb bd71e13
cln
jeremiedbb f7c6bbf
cln doc
jeremiedbb b5b23b4
Merge remote-tracking branch 'upstream/main' into pr/cmarmo/16948
jeremiedbb 4d20ad4
adress comments
jeremiedbb 584744a
black
jeremiedbb 607e7db
cln
jeremiedbb 6c4382b
remove solver param
jeremiedbb a029c25
lint
jeremiedbb 8b37550
Merge branch 'master' into modified_nmf_for_minibatch
jeremiedbb 54f17ed
apply suggestions
jeremiedbb 34ba813
lint
jeremiedbb 8d54ef7
improve obj function readability
jeremiedbb 8e18e0b
non-negative
jeremiedbb e6d7fa6
Merge branch 'master' into modified_nmf_for_minibatch
jeremiedbb e52cbd2
address comments
jeremiedbb eb06c60
lint
jeremiedbb dad2eb2
address comments
jeremiedbb a027686
credit pcerda
jeremiedbb ce646d7
update what's new entry
jeremiedbb 616f9ba
test beta_loss > 2
jeremiedbb b6681f8
improve solve_W docstring
jeremiedbb 0922eb3
improve partial_fit docstring
jeremiedbb 051fa8e
don't introduce new warnings in tests
jeremiedbb 0094d4f
lint
jeremiedbb 7978db1
Merge remote-tracking branch 'upstream/main' into pr/cmarmo/16948
jeremiedbb a7ef482
address review comments
jeremiedbb c77de85
lint
jeremiedbb e2510ec
fix position in what's new
jeremiedbb 3ecf370
better format obj function in docstring
jeremiedbb 15ead2e
Merge branch 'main' into modified_nmf_for_minibatch
jeremiedbb 9abf0c9
Merge remote-tracking branch 'upstream/main' into pr/cmarmo/16948
jeremiedbb 5790e5f
avoid convergence warning in example
jeremiedbb 99ec76c
Merge branch 'modified_nmf_for_minibatch' of https://github.com/cmarm…
jeremiedbb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.