Matfree

Latest version: v0.0.17

Safety actively analyzes 634065 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.0.17

This release is a slightly bigger deal than the previous ones because it contains the algorithms from the (just published!)

> Gradients of functions of large matrices. Nicholas Krämer, Pablo Moreno-Munoz, Hrittik Roy, Søren Hauberg. Preprint on arXiv:2405.17277. 2024.

[Here is a link to the preprint](https://arxiv.org/abs/2405.17277).

To be precise, with release v0.0.17, Matfree will provide efficient gradients of Lanczos and Arnoldi iterations, which makes much of matrix-free linear algebra reverse-mode differentiable! To access this code, continue using `matfree.tridiag_sym` and `matfree.hessenberg`, and ensure that `custom_vjp` is set to `True`.

Other changes include a new Hessenberg-factorisation via the Arnoldi iteration, some information regarding citations and Matfree's API policy, removing matfree.pinv, and moving `matfree.decomp.svd_approx` to `matfree.eig.svd_partial`. The full changelog is below.

What's Changed
* Implement decomp.hessenberg() via the Arnoldi decomposition by pnkraemer in https://github.com/pnkraemer/matfree/pull/192
* Implement differentiable Lanczos and Arnoldi iterations by pnkraemer in https://github.com/pnkraemer/matfree/pull/193
* Add citation information to matfree's Arnoldi and Lanczos iterations by pnkraemer in https://github.com/pnkraemer/matfree/pull/197
* Remove matfree.pinv and implement matfree.eig by pnkraemer in https://github.com/pnkraemer/matfree/pull/198
* Explain Matfree's API policy by pnkraemer in https://github.com/pnkraemer/matfree/pull/199


**Full Changelog**: https://github.com/pnkraemer/matfree/compare/v0.0.16...v0.0.17

0.0.16

This release reorganises the API without adding/removing functionality.
Stochastic trace estimation is available through `stochtrace.py` instead of `hutchinson.py` (the functionality remains the same).
Matrix-function functionality has been moved to dedicated modules `funm.py` and `stochtrace_funm.py` and `polynomial.py` as well as `lanczos.funm_vector_product` have been moved there. All functionality remains.
Matrix-free matrix decompositions (Lanczos, bidiagonalisation, ...) are now in `decomp.py` instead of `lanczos.py` (which has been removed).

Some functions and variables have been renamed.


This change breaks existing code. To learn how to update to this new look, consult the API documentation under https://pnkraemer.github.io/matfree/ and the changelogs below.

What's Changed
* Deprecate matfree.pinv by pnkraemer in https://github.com/pnkraemer/matfree/pull/186
* Show the source-code in the documentation by pnkraemer in https://github.com/pnkraemer/matfree/pull/187
* Create dedicated `funm` and `funm_trace` modules for functions of matrices by pnkraemer in https://github.com/pnkraemer/matfree/pull/188
* Rename misnamed functions by pnkraemer in https://github.com/pnkraemer/matfree/pull/189
* Rename hutchinson.py to stochtrace.py by pnkraemer in https://github.com/pnkraemer/matfree/pull/190
* Rename lanczos.py to decomp.py by pnkraemer in https://github.com/pnkraemer/matfree/pull/191


**Full Changelog**: https://github.com/pnkraemer/matfree/compare/v0.0.15...v0.0.16

0.0.15

What's Changed
* Replace all formatters with Ruff by pnkraemer in https://github.com/pnkraemer/matfree/pull/183
* Implement a tutorial for low-memory trace estimation by pnkraemer in https://github.com/pnkraemer/matfree/pull/184
* Implement a partial Cholesky factorisation and diagonal-plus-low-rank preconditioning by pnkraemer in https://github.com/pnkraemer/matfree/pull/185


**Full Changelog**: https://github.com/pnkraemer/matfree/compare/v0.0.14...v0.0.15

0.0.14

This release introduces Chebyshev approximation for computing functions of (large) matrices.

This release is not backwards compatible because some functions are reorganised: the content of `slq.py` and `decomp.py` has been collected in a new `lanczos.py`. See the changelog for concrete differences, and consult the documentation for where to find which function.

What's Changed
* Implement the Chebyshev recursion for computing matrix-function-vector products (draft) by pnkraemer in https://github.com/pnkraemer/matfree/pull/175
* Restructure lanczos-related modules by pnkraemer in https://github.com/pnkraemer/matfree/pull/176
* Merge decomposition-algorithms with decompose_fori_loop by pnkraemer in https://github.com/pnkraemer/matfree/pull/177
* Rename lanczos.integrand_* functions by pnkraemer in https://github.com/pnkraemer/matfree/pull/178
* Rename matfun.py to polynomial.py by pnkraemer in https://github.com/pnkraemer/matfree/pull/179
* Update the README to include new functionality by pnkraemer in https://github.com/pnkraemer/matfree/pull/180


**Full Changelog**: https://github.com/pnkraemer/matfree/compare/v0.0.13...v0.0.14

0.0.13

What's Changed
* Clarify typing in matfree.decomp by pnkraemer in https://github.com/pnkraemer/matfree/pull/171
* Implement validation of a unit two norm in Lanczos-style decompositions by pnkraemer in https://github.com/pnkraemer/matfree/pull/172
* Clarify normalisation in Gram-Schmidt by pnkraemer in https://github.com/pnkraemer/matfree/pull/173
* Make SLQ integrands behave correctly for arbitrary input vectors by pnkraemer in https://github.com/pnkraemer/matfree/pull/174


**Full Changelog**: https://github.com/pnkraemer/matfree/compare/v0.0.12...v0.0.13

0.0.12

What's Changed
* Replace stats_* functions with wrappers for the integrand_* functions by pnkraemer in https://github.com/pnkraemer/matfree/pull/168
* Removed an outdated todo by pnkraemer in https://github.com/pnkraemer/matfree/pull/169
* Rephrase headings in README.md by pnkraemer in https://github.com/pnkraemer/matfree/pull/170


**Full Changelog**: https://github.com/pnkraemer/matfree/compare/v0.0.11...v0.1.0

What's Changed
* Replace stats_* functions with wrappers for the integrand_* functions by pnkraemer in https://github.com/pnkraemer/matfree/pull/168
* Removed an outdated todo by pnkraemer in https://github.com/pnkraemer/matfree/pull/169
* Rephrase headings in README.md by pnkraemer in https://github.com/pnkraemer/matfree/pull/170


**Full Changelog**: https://github.com/pnkraemer/matfree/compare/v0.0.11...v0.0.12

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.