Commit d7586bc
refactor: merge john-development to main (#187)
* Initial commit of John refactor of SNMF (#140)
* added my files
* [pre-commit.ci] auto fixes from pre-commit hooks
* Updated X and Y optimizers, now produces formatted but partially incorrect output
* removed duplicate class
* Working build (no normalization)
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix stop condition and add Y/A normalization (#141)
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* Added x normalization (#143)
Co-authored-by: John Halloran <jhalloran@oxy.edu>
Co-authored-by: Simon Billinge <sbillinge@users.noreply.github.com>
* Loop cleanup and scikit-learn style parameters (#146)
* Cleaned up looping behavior and aligned some params with scikit-learn.
* Combined quadratic solvers
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* feat: Add random state feature. (#150)
* feat: Add random state feature.
* Add class docstring
* components->n_components
* Updated docstring
* Shorten and reformat docstring
* docstring typo
* Flag self.rng as private
* Make logic for n_components and Y0 more rigid
* added class attributes to docstring
* fix: cleaner import of SNMFOptimizer
* fix: correct class instantiation after change in import
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
Co-authored-by: Simon Billinge <sbillinge@users.noreply.github.com>
* refactor: Remove old tests and source files (#160)
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* style: convert variables to lowercase (#159)
* style: Convert variables to lowercase
* chore: Add news item
* style: lowercase remaining variables
* style: fix indentation on docstrings
* style: rename and make public certain attributes
* style: update docstring defaults
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* Fixes to class attributes and style (#163)
* fix: use symmetric initial phase fractions
* style: don't store objective function in a class attribute, just use history
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* Restored functionality to working state (#165)
* docs: update docstring and imports
* style: remove non-class function from class
* fix: using working quadratic solver for weights
* fix: restore working MATLAB-like loop functionality
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* feat: add live plotting of updates (#166)
* feat: add live plotting of updates
* style: make plotting vars lowercase
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* test: add initial test of optimizer (#167)
* test: add initial test of optimizer
* style: switch to local imports and plural folders
* style: add README to sNMF test
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* Replace 1D apply_interpolation with np.interp (#168)
* refactor: get residual matrix without a helper
* perf: remove unused derivatives from apply_interpolation
* chore: remove old residual matrix and reference to derivatives
* refactor: replace remaining apply_interpolation with np.interp
* style: remove references to old variable names
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* refactor: reconstruct separate from residuals (#169)
* refactor: reconstruct separate from residuals
* fix: inputs to reconstruct_matrix should not be optional
* docs: updated default documentation for init_weights
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* refactor: move optimization out of init and into fit (#170)
* style: per sklearn, attributes learned from data end with underscore
* refactor: move optimization out of init and into fit
* fix: use new fit() for test
* style: end fit() with return self
* docs: update docstring to reflect new functionality
* refactor: use rho and eta in fit
* feat: use reset for sequential refinements
* fix: use copies for safety
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* refactor: apply_interpolation_matrix() is now compute_stretched_components() (#171)
* fix: guard against zero/NaN stretches in apply_interpolation_matrix
* refactor: use broadcasting instead of np.tile in apply_interpolation_matrix
* refactor: flatten from a single buffer in apply_interpolation_matrix()
* refactor: drastically simplify indexing in apply_interpolation_matrix() and remove legacy MATLAB terminology
* style: rename apply_interpolation_matrix() to compute_stretched_components()
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* refactor: change get_objective_function into a static method and getter (#174)
* refactor: compute objective function in a static method and retrieve via getter
* refactor: change get_objective_function into a static method and getter
* fix: update location for _tests-on-pr.yml
* fix: use expected name for requirements/tests.txt
* fix: add cvxpy to requirements/conda.txt
* fix: add matplotlib to requirements/conda.txt
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* skpkg: apply black to all files in the project directory (#176)
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* chore: update package to latest scikit-package version (#178)
* chore: update to latest version of scikit-package
* chore: restore citation information
* fix: restore missing requirements
* [pre-commit.ci] auto fixes from pre-commit hooks
* fix: restore historical changelog
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: skip updating stretch if stretching factor is zero (#181)
* style: make line length <80 throughout
* feat: skip updating stretch() if stretching factor is zero
* chore: fix codespell complaint
* fix: use correct version of rho
* style: clean up several lines and remove noqa
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* docs: revamp documentation (#182)
* refactor: move doc to docs and update requirements
* docs: remove old tables and recreate getting started page
* docs: load documentation from snmf_class.py
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
* refactor: change references of snmf to stretched-nmf (#185)
* chore: use new name in scikit-package space
* refactor: rename references throughout program snmf -> stretched-nmf
* refactor: rename project references
* chore: add news item for package-name-update
* chore: CI toml issue
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
---------
Co-authored-by: John Halloran <jhalloran@oxy.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Simon Billinge <sbillinge@users.noreply.github.com>1 parent 1231d71 commit d7586bc
File tree
63 files changed
+3909
-2418
lines changed- .codespell
- .github
- ISSUE_TEMPLATE
- workflows
- docs
- source
- _static
- api
- img
- doc/source
- api
- news
- requirements
- src/diffpy
- snmf
- stretched_nmf
- tests
- inputs/test_snmf_optimizer
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
63 files changed
+3909
-2418
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments