https://github.com/mipals/egrssmatrices
Short implementation of a EGRSS matrix format including an application example in smoothing spline fitting.
https://github.com/mipals/egrssmatrices
smoothing-spline smoothing-splines spline-interpolation
Last synced: 3 months ago
JSON representation
Short implementation of a EGRSS matrix format including an application example in smoothing spline fitting.
- Host: GitHub
- URL: https://github.com/mipals/egrssmatrices
- Owner: mipals
- Created: 2023-10-17T15:32:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-29T11:28:08.000Z (over 1 year ago)
- Last Synced: 2025-02-23T06:45:09.641Z (3 months ago)
- Topics: smoothing-spline, smoothing-splines, spline-interpolation
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# egrssmatrices
[](https://github.com/mipals/egrssmatrices/actions/workflows/python-app.yml?query=branch%3Amain)
## Description
A package for efficiently computing with symmetric extended generator representable semiseparable matrices (EGRSS Matrices) and a variant with added diagonal terms. In short this means matrices of the form$$
\mathbf{K} = \text{\textbf{tril}}(\mathbf{UV}^\top) + \text{\textbf{triu}}\left(\mathbf{VU}^\top,1\right), \quad \mathbf{U}, \mathbf{V}\in\mathbb{R}^{n\times p}
$$$$
\mathbf{K} = \text{\textbf{tril}}(\mathbf{UV}^\top) + \text{\textbf{triu}}\left(\mathbf{VU}^\top,1\right) + d \mathbf{I}, \quad \mathbf{U}, \mathbf{V}\in\mathbb{R}^{n\times p},\ d\in\mathbb{R}
$$$$
\mathbf{K} = \text{\textbf{tril}}(\mathbf{UV}^\top) + \text{\textbf{triu}}\left(\mathbf{VU}^\top,1\right) + \text{\textbf{diag}}(\mathbf{d}), \quad \mathbf{U}, \mathbf{V}\in\mathbb{R}^{n\times p},\ \mathbf{d}\in\mathbb{R}^n
$$All implemented algorithms (multiplication, Cholesky factorization, forward/backward substitution as well as various traces and determinants) scales with $O(p^kn)$. Since $p \ll n$ this result in very scalable computations.
A more in-depth descriptions of the algorithms can be found in [1] or [here](https://github.com/mipals/SmoothingSplines.jl/blob/master/mt_mikkel_paltorp.pdf).
### Example application: Smoothing Splines
An application of EGRSS matrices is smoothing splines as the so-called spline kernel matrix is an EGRSS matrix. An example implementation can be found in `examples/smoothingsplines.py`.## References
[1] M. S. Andersen and T. Chen, “Smoothing Splines and Rank Structured Matrices: Revisiting the Spline Kernel,” SIAM Journal on Matrix Analysis and Applications, 2020.