LogPsplines in JAX
Project description
LogPSplinePSD estimates power spectral densities (PSDs) with Bayesian log-P-splines. It supports univariate and multivariate time series, fits smooth spectral matrices with NumPyro/JAX, and returns ArviZ-compatible xarray.DataTree outputs for diagnostics and plotting.
Highlights
Log-domain P-spline models for positive PSDs.
Multivariate Wishart likelihoods for spectral matrices.
VI warm starts and factorised multivariate NUTS.
Optional frequency-domain coarse graining.
Posterior PSD quantiles, coherence summaries, and diagnostic plots.
Install
For development, use the repository virtual environment:
source .venv/bin/activate
python -m pip install -e '.[dev]'
For package use:
python -m pip install LogPSplinePSD
Quick Example
from log_psplines.example_datasets.varma_data import VARMAData
from log_psplines.mcmc import run_mcmc
from log_psplines.pipeline.config import PipelineConfig
data = VARMAData(n_samples=256, fs=64.0, seed=7)
idata = run_mcmc(
data.ts,
PipelineConfig(
n_knots=6,
n_warmup=50,
n_samples=100,
vi_steps=200,
outdir="runs/varma_quickstart",
),
)
Documentation
Build the docs locally with:
source .venv/bin/activate
.venv/bin/jupyter-book build docs
The public docs focus on package usage, configuration, outputs, API reference, and implementation notes. Domain-specific examples are intentionally kept out of the main docs for now and can be added later as separate studies.
References
Eilers, P. H. C., & Marx, B. D. (1996). Flexible smoothing with B-splines and penalties. Statistical Science, 11(2), 89-121.
Maturana-Russel, J., & Meyer, R. (2021). P-spline spectral density estimation with a discrete penalty. arXiv:1905.01832.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file logpsplinepsd-0.1.0.tar.gz.
File metadata
- Download URL: logpsplinepsd-0.1.0.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8deda6b3606ea4254b16f49c1e3f4e8fef435a0d1b7ef67fb696daf337075ba9
|
|
| MD5 |
b152198df372604e6ba8819868ad13ab
|
|
| BLAKE2b-256 |
200b5c56f9e54b5853364b61f3f01d6b358824f5cf00e0c18a0015ee86d98164
|
Provenance
The following attestation bundles were made for logpsplinepsd-0.1.0.tar.gz:
Publisher:
pypi.yml on nz-gravity/LogPSplinePSD
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
logpsplinepsd-0.1.0.tar.gz -
Subject digest:
8deda6b3606ea4254b16f49c1e3f4e8fef435a0d1b7ef67fb696daf337075ba9 - Sigstore transparency entry: 1805054011
- Sigstore integration time:
-
Permalink:
nz-gravity/LogPSplinePSD@7af67ce4bb02e69b5ff302fcbd7c234c10b05359 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nz-gravity
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@7af67ce4bb02e69b5ff302fcbd7c234c10b05359 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file logpsplinepsd-0.1.0-py3-none-any.whl.
File metadata
- Download URL: logpsplinepsd-0.1.0-py3-none-any.whl
- Upload date:
- Size: 136.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14bee41b80fe50f3a3f5f4b843a39774e050fca61bedcd51f9cf0e2f71553b67
|
|
| MD5 |
d7fb2cac01d2fdb547138fdfa554eb57
|
|
| BLAKE2b-256 |
8453be15f2de76865731aa51d5831c804db07fa9da1d30d899ff5005d951f5b7
|
Provenance
The following attestation bundles were made for logpsplinepsd-0.1.0-py3-none-any.whl:
Publisher:
pypi.yml on nz-gravity/LogPSplinePSD
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
logpsplinepsd-0.1.0-py3-none-any.whl -
Subject digest:
14bee41b80fe50f3a3f5f4b843a39774e050fca61bedcd51f9cf0e2f71553b67 - Sigstore transparency entry: 1805054019
- Sigstore integration time:
-
Permalink:
nz-gravity/LogPSplinePSD@7af67ce4bb02e69b5ff302fcbd7c234c10b05359 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nz-gravity
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@7af67ce4bb02e69b5ff302fcbd7c234c10b05359 -
Trigger Event:
workflow_run
-
Statement type: