Skip to main content

github PyPI version arXiv:1611.07529 license

Welcome to romSpline

romSpline is an easy-to-use Python code for compressing and interpolating 1d data using reduced-order modeling and statistical learning methods.

romSpline uses a greedy algorithm to find a nearly optimal subset of data samples that recovers the original data, to the requested tolerance, with a univariate spline interpolant. The output is the optimal subset of data and the corresponding reduced-order spline interpolant.

romSpline also contains code to estimate the prediction errors at new samples due to interpolation. These methods are largely based on Monte Carlo K-fold cross-validation studies. The mean of the resulting validation errors can be used as a global and useful upper bound on the interpolation errors.

This code should be useful for downsampling or compressing large data arrays to their essential components from which the original information can be constructed and new data predicted through interpolation. The degree of downsampling can be significant (e.g., orders of magnitude) for relatively smooth data. Furthermore, the distribution of the resulting reduced dataset provides information into features and structures of the data that might otherwise not be readily observed.

Future releases of romSpline will provide locally adapted interpolation error estimations based on more refined cross-validation studies. In addition, enhancements to the greedy algorithm will incorporate possible additional information about data quality (such as uncertainties in the data values being compressed and interpolated, if available).

If you use this code for academic work then please cite the following paper describing the method and algorithm:

  • C. R. Galley and P. Schmidt, "Fast and efficient evaluation of gravitational waveforms via reduced-order spline interpolation" arXiv:1611.07529

Installation

romspline is available through PyPI:

pip install romspline

From source

git clone https://github.com/crgalley/romspline.git
cd romspline
python setup.py install

If you do not have root permissions, replace the last step with python setup.py install --user. Instead of using setup.py manually, you can also replace the last step with pip install . or pip install --user ..

Alternatively, you can download or clone this repository and add the download path to your PYTHONPATH variable.

As another alternative, include the following lines in your Python code:

import sys
sys.path.append(<path to romspline>)
import romspline

Dependencies

All of these can be installed through pip or conda.

romSpline requires NumPy, SciPy, and H5py, which come with most Python distributions. For parallelization, which is useful but not necessary for some of the cross-validation routines, romSpline currently uses the concurrent.futures module. If you are using Python 2 and do not have concurrent.futures installed you may install it using pip:

pip install futures

Future versions of romSpline will not use concurrent.futures.

Getting started

See the accompanying IPython notebooks (romSpline_example.ipynb and errors_example.ipynb) for simple tutorials on using the code and estimating errors of the reduced-order spline interpolant for predicting new values.

Author information

Copyright (C) 2015 Chad Galley (crgalley "at" tapir "dot" caltech "dot" edu). Released under the MIT/X Consortium license. Comments and requests welcome.

Release files for romspline 1.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for romspline 1.1.6
File Size Uploaded
romspline-1.1.6.tar.gz 39.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for romspline 1.1.6
File Interpreter ABI Platform
romspline-1.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 83.5 kB

Release files / romspline-1.1.6.tar.gz

Download URL romspline-1.1.6.tar.gz
Size 39.8 kB
Tags Source
SHA-256 checksum
How to use checksums
20d5788063853656c072dc208970a2d7ba19b376814418f9198b6e5a2d1ec1e6
BLAKE2b-256 checksum
How to use checksums
ffee5a80838f0263add7923744ab5ef1ee2e100c34182421ac463b8d36c4caff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5

Release files / romspline-1.1.6-py3-none-any.whl

Download URL romspline-1.1.6-py3-none-any.whl
Size 43.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9a80690f252864933064b4ebb3a1f5ea534bf8d12951969cea8bb5af4f8e56e
BLAKE2b-256 checksum
How to use checksums
adbdfecd6ac66080fb86bd07100985d7946e40ff24e67172377207525ea41b0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5

Release history Release notifications | RSS feed

This release

1.1.6 This release

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page