Skip to content

Conversation

@nielsschlusser
Copy link
Contributor

This feature branch contains the adjustments and augmentations of the code based on @rsenne 's suggestions in issues #10 and #12.

nielsschlusser added 30 commits August 22, 2025 15:49
- implement explained_variance_ratio_ for both, NipalsPCA and NipalsPLS
- implemented corresponding unit tests
- re-organized imports to comply with pylint policy
- currently still empty slice warning in NipalsPLS l. 799
- set up documentation with sphinx-quickstart
- built documentation with tox -e docs
- view docs with python -m http.serve from docs/ dir and visiting localhost:8000 in browser
- create docs with sphinx
- adapted docstrings in src/open_nipals/ folder
- include .readthedocs.yaml config file
- change README.md pypi installation paragraph
- recompile the docs
Change to python version 3.13
Address rsenne's Small patch candidate 1.
- guard convergence division against zero norm in both modules, adressing rsenne's small patch candidates 2.
- restructure calc_imd in nipalsPCA.py in line with rsenne's small patch candidate suggestion 1
Use pseudo-inverse in nipalsPCA.py projection bit in transform to address rsenne's small patch candidates 3.
- change print to warning statement in case iterations are terminated due to reaching maximum number of iterations in both modules, addressing rsenne's small patch candidate 4.
- use fstrings in the prints for verbose option instead of  .format(...)
- use np.concatenate  instead of np.append for performance gains, addressing rsenne's small patch candidates 6
- relax the default relative tolerance criteria to 1e-6, addressing rsenne's comment on performance
Correct bug in NIpalsPLS.calc_imd when using scores
Missed another inv->pinv
unify exponential numbers format
- change base classes for NipalsPCA from _BasePCA (private, unstable) to BaseEstimator, TransformerMixin (public)
- change base classes for NipalsPLS from _PLS (private, unstable) to BaseEstimator, TransformerMixin, RegressorMixin (public)
- re-organize inputs to comply with pylint input organization hierarchy (python native, thrid party, first party)
- fit new components in NipalsPCA transform conditionalMean with set_components, adddressing rsenne's major issue 5
- updated and streamlined documentation where necessary
- streamlined NipalsPLS calc_oomd, adapted to NipalsPCA counterpart
- re-create documentation
- Ledoit Wolf does still not work due to dimensionality issue
- updated docs
- two more options for calc_imd in both modules: full using the full covariance matrix, and ledoit_wolf for using the full covariance matrix using the Ledoit Wolf shrinkage for performance
- update the docs
- split get_explained_variance and get_Explained_variance_ratio methods from properties
- both methods now return numpy arrays
- fixed the unit tests
- nipalsPCA.py: remove use_Denom=True statements, as this is the default value anyway
- nipalsPLS.py: follow the recipe of K. Dunn's book for normalization
- update the documentation
Correct normalization
- implement tighter limits on PLS unit tests
- remove regression vector computation from set_Components unit test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants