PyTikhonov
PyTikhonov is a pure-Python toolkit for Tikhonov regularization of linear inverse problems, with a focus on regularization parameter selection and GSVD-based diagnostics.
It is primarily intended for small to moderate-scale problems (e.g., $N$ up to a few thousand) where matrix-like access to $A$ and $L$ is available. For larger problems, it provides a ProjectedTikhonovFamily interface designed to be combined with iterative methods (e.g., Krylov / model reduction bases).
Installation
pip install pytikhonov
Features
-
Core object:
TikhonovFamily(A, L, b, d, ...)representing the entire family $$x_\lambda = \arg\min_x |Ax - b|_2^2 + \lambda |Lx - d|_2^2$$ for $\lambda > 0$. -
GSVD-based implementation (via
easygsvd):- Fast evaluation of $x_\lambda$ for many $\lambda$.
- Efficient computation of $|Ax - b|_2^2$, $|Lx - d|_2^2$, and their derivatives.
- Support for both $\lambda$ and reciprocal parameterization $\beta = 1/\lambda$.
-
Diagnostic tools:
- Picard plot (discrete Picard condition).
- L-curve (and curvature-based “L-corner”).
- Monitoring function and degrees of freedom.
-
Regularization parameter selection:
- L-corner heuristic.
- Discrepancy principle (DP).
- Generalized cross validation (GCV).
- Convenience function to compare all methods on a given problem.
- Randomization experiments to study robustness of parameter choices.
-
Performing projections:
ProjectedTikhonovFamilyfor reduced problems on subspaces $\underline{x} + \mathrm{col}(V)$.- Designed to plug into Krylov / model-reduction pipelines (e.g., GKB, Arnoldi) for large-scale problems.
Minimal example
import numpy as np
from pytikhonov import TikhonovFamily, lcorner
# Example problem (A, L, b, d as dense arrays)
A = ...
L = ...
b = ...
d = np.zeros(L.shape[0])
# Build the Tikhonov family
tf = TikhonovFamily(A, L, b, d)
# Select lambda via the L-corner heuristic
lcorner_data = lcorner(tf)
lambdah_star = lcorner_data["lambdah"]
x_star = lcorner_data["x_lambdah"]
For full details, mathematical background, and additional examples (Picard plots, monitoring function, IRLS, projected problems, etc.), see the documentation PDF included in the repository.
Metadata
Release files for pytikhonov 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytikhonov-0.0.1.tar.gz | 2.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytikhonov-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.3 MB
Release files / pytikhonov-0.0.1.tar.gz
| Download URL | pytikhonov-0.0.1.tar.gz |
|---|---|
| Size | 2.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aff4851a4388eb4c556b3f0e3f1399039b0b680f273ec439f33991b05cb9ff97
|
|
BLAKE2b-256 checksum How to use checksums |
db1a4357d817a49f813b7efcd2477379fb99c07193c2840632fdd04ddb8c1c5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.6
|
Release files / pytikhonov-0.0.1-py3-none-any.whl
| Download URL | pytikhonov-0.0.1-py3-none-any.whl |
|---|---|
| Size | 33.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84786dc6d914349cc58c6e7430b012b7e3f700f63b74a3dc533d4b69b9da240f
|
|
BLAKE2b-256 checksum How to use checksums |
0570dcc24ccec252bf8411ac0b09ec0b0fc47a37298eabdf701fdc12a659ae24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.6
|