Releases: pnkraemer/matfree
v0.2.1
This release makes matfree.eig
compatible with pytrees. That means that the linear operators can now map 2d-tensors to 2d-tensors or lists to lists -- any Pytree goes. The corresponding eigenvectors and singular vectors inherit the respective shape.
These changes are compatible with the API introduced by v0.2.0.
What's Changed
New Features
- Make the partial SVD compatible with Pytrees by @pnkraemer in #236
- Make the partial eigendecompositions compatible with Pytrees by @pnkraemer in #237
Full Changelog: v0.2.0...v0.2.1
v0.2.0
This release marks a few changes in the eigen- and singular-value module matfree.eig
. Notably, the eigenvalue-related functions follow the same style as the matrix functions and decompositions (by returning Callables, not arrays). This makes it easier to combine them with other operations. Further, matfree.eig
now contains partial eigenvalue (symmetric and unsymmetric) decompositions in addition to the already present singular-value decomposition.
Most of these changes are not backwards-compatible. However, existing code should be relatively easy to update -- if this is not the case, open an issue and ask for help!
What's Changed
Breaking Changes
- Automatically implement vector-matrix products with
jax.vjp
by @pnkraemer in #229 - Rename all
krylov_depth
-like parameters tonum_matvecs
and ensure consistency between decomps by @pnkraemer in #230 - Change the ordering of eigen-/singular-vectors in
eig.py
by @pnkraemer in #235 - Make
eig.svd_partial
batchable by @pnkraemer in #232
New Features
- Implement
eig.eig_partial
by @pnkraemer in #234 - Implement
eig.eigh_partial
and allow parametric matvecs in partial SVD & eig by @pnkraemer in #233
Other Changes
- Adopt jax.tree.* and rename backend.tree_util to backend.tree by @pnkraemer in #231
Full Changelog: v0.1.1...v0.2.0
v0.1.1
This release mainly contains improvements to the documentation, including two new tutorials and a few upgrades to the docstrings.
What's Changed
Improvements to the Documentation
- Correct typos and some minor stylistic issues in the README by @pnkraemer in #214
- Write a docstring for tridiag_sym by @pnkraemer in #215
- Enable docstring-tests and write some missing docstrings by @pnkraemer in #216
- Autoformat the example scripts in all docstrings by @pnkraemer in #217
- Implement a tutorial for matrix functions by @pnkraemer in #218
- Configure automatically generated release notes to organize how PRs are displayed by @pnkraemer in #219
- Mention the PR labels (and some other items) in the contribution guide by @pnkraemer in #220
Full Changelog: v0.1.0...v0.1.1
v0.1.0
This release marks that Matfree is no longer considered experimental. The API has somewhat converged. Nonetheless, Matfree remains a research project: Anything may change anytime. But from now on, we follow semantic versioning a little more rigorously (Matfree's API policy is discussed in the documentation).
This release is not compatible with previous releases. The difference is that some of the matrix decompositions' output signatures have changed. Some matrix function codes now expect full algorithms to be passed as arguments, not parameters for arguments. The friction with previous codes should be relatively small. Consult the tutorials on how to use the new API.
What's Changed
- Make all decompositions have similar output types by @pnkraemer in #207
- Make integrand_funm_tridiag_sym expect algorithms as inputs so the user can choose (e.g.) a reorthogonalisation mode by @pnkraemer in #210
- Implement dense_funm_product_svd to generalise the code for matrix-functions via bidiagonalisation by @pnkraemer in #211
- Make integrand_funm_product_* expect algorithms as inputs (not algorithm parameters) by @pnkraemer in #212
- Update Matfree's version policy description because v0.1.0 is next by @pnkraemer in #213
Full Changelog: v0.0.19...v0.1.0
v0.0.19
What's Changed
- Autoupdate the pre-commit hook by @pnkraemer in #205
- Implement funm_arnoldi to enable functions of non-structured matrices by @pnkraemer in #206
Full Changelog: v0.0.18...v0.0.19
v0.0.18
What's Changed
- Fix a typo in the bibtex entries by @pnkraemer in #200
- Implement matrix functions by combining matrix decompositions with dense matrix functions by @pnkraemer in #201
- Improve the consistency of bidiag() and tridiag_sym() by @pnkraemer in #202
- Move matvec to estimation instead of algorithm-construction to avoid future code duplication by @pnkraemer in #203
- Add a 'materialize' option to tridiag() and bidiag() to simplify downstream applications by @pnkraemer in #204
Full Changelog: v0.0.17...v0.0.18
v0.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.
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 #192
- Implement differentiable Lanczos and Arnoldi iterations by @pnkraemer in #193
- Add citation information to matfree's Arnoldi and Lanczos iterations by @pnkraemer in #197
- Remove matfree.pinv and implement matfree.eig by @pnkraemer in #198
- Explain Matfree's API policy by @pnkraemer in #199
Full Changelog: v0.0.16...v0.0.17
v0.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 #186
- Show the source-code in the documentation by @pnkraemer in #187
- Create dedicated
funm
andfunm_trace
modules for functions of matrices by @pnkraemer in #188 - Rename misnamed functions by @pnkraemer in #189
- Rename hutchinson.py to stochtrace.py by @pnkraemer in #190
- Rename lanczos.py to decomp.py by @pnkraemer in #191
Full Changelog: v0.0.15...v0.0.16
v0.0.15
What's Changed
- Replace all formatters with Ruff by @pnkraemer in #183
- Implement a tutorial for low-memory trace estimation by @pnkraemer in #184
- Implement a partial Cholesky factorisation and diagonal-plus-low-rank preconditioning by @pnkraemer in #185
Full Changelog: v0.0.14...v0.0.15
v0.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 #175
- Restructure lanczos-related modules by @pnkraemer in #176
- Merge decomposition-algorithms with decompose_fori_loop by @pnkraemer in #177
- Rename lanczos.integrand_* functions by @pnkraemer in #178
- Rename matfun.py to polynomial.py by @pnkraemer in #179
- Update the README to include new functionality by @pnkraemer in #180
Full Changelog: v0.0.13...v0.0.14