Skip to content

About

A Python toolkit for geometry-preserving simplification and byte-efficient compression of multi-curve piecewise-linear time series.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Relispline

Relispline

Simplify curves without changing their relationships. Measure the file you actually save.

A Python research library and local CSV tool for 2–8 piecewise-linear time series. It retains original samples, bounds vertical error on every interval, and preserves the exact relative signs of selected curve pairs—including crossings, contacts and overlaps. Each curve can keep its own sample grid.

The library includes point-count solvers, an explicit shared-time byte objective, independent output auditors and binary codecs. A compact browser interface supports light/dark themes and English, Chinese and Japanese. Separate two-curve event modes allow a declared crossing-time tolerance.

Install and run

Requires Python 3.10+ and NumPy. Install inside a project environment:

git clone https://github.com/cabal312512/Relispline.git
cd Relispline
python -m venv .venv
# Linux/macOS:
.venv/bin/python -m pip install --cache-dir .cache/pip .
.venv/bin/python -m relispline serve

On Windows, use .venv\Scripts\python.exe in place of .venv/bin/python. Open the local address printed by the command; the multi-curve view is at /many. The application sends no data to an external service.

The v0.6.0 release contains a wheel, source distribution, public research collection, checksums and historical evidence archive. This release adds the deterministic certificate engine as a separate experimental API; existing simplification and UI defaults remain unchanged. Download the wheel and install its local filename with the same environment's python -m pip install. This project has not been published to PyPI.

python -m relispline compress-bytes examples/bytes.csv --columns A B C --epsilon 2 0 0 --mode research --out out/toy.cgz --report out/toy.json
python -m relispline audit-bytes examples/bytes.csv out/toy.cgz --columns A B C --epsilon 2 0 0

Run examples with your environment's Python. Existing outputs require --force to overwrite. API and CLI guide.

from relispline import simplify_bytes, audit_bytes

x = [0, 1, 2, 3]
series = {"A": [0, 1, 2, 3], "B": [2, 3, 4, 5]}
result = simplify_bytes(x, series, epsilon=0, time_limit=5)
checked = audit_bytes({"x": x, "series": series}, result, epsilon=0)
assert checked["valid"]
print(result["total_vertices"], result["optimality"])

Necessary-vertex certificates

The experimental certificate module computes necessary original samples before constructing a full shape graph, safely reduces that graph and compares against paid complete-graph controls. It preserves the same strict relationship/error contract. Bounds concern points, not compressed bytes; decoded file selection includes a complete-original reference.

python -m pip install --cache-dir .cache/pip '.[certificates]'
python -m relispline.certificates compress examples/bytes.csv --columns A B C --epsilon 2 0 0 --core-budget 5 --out out/certified.rlc --report out/certified.json
python -m relispline.certificates audit examples/bytes.csv out/certified.rlc --columns A B C --epsilon 2 0 0

Saved certificate results and reproduction instructions include the complete paired matrix, profiles, ablations, failed/interrupted attempts and input provenance. A tight point bound can coexist with a larger candidate file; the delivery then falls back to the constructed original reference.

What the experiments show

The latest main cohort has 72 configurations from temperature and EEG recordings. Three timing repetitions measure the same configuration; they are not independent samples.

Comparison Temperature EEG
Fixed historical point outputs: shared vs independent encoding, raw bytes 29.00% smaller 40.10% smaller
New cohort: byte best response vs point solver, same shared format 4.06% smaller 0.35% smaller
New cohort: product vs original common-grid file, same zlib wrapper 54.58% smaller 6.11% smaller

These are different comparisons and cohorts; percentages cannot be added. Values are record/block-stratified means of configuration reductions, not pooled byte ratios. Joint search beat best response in 1/72 configurations, tied in 65 and lost in 6. Best response remains the default research method.

Separate byte comparisons and the negative large-scale result

At larger sizes, EEG file savings were zero. Temperature at 8 × 8192 samples produced a file 48.57% larger than the best original common-grid reference because the finite budget did not reach every layout. All eight-curve scale cases retained unknown global byte optimality. Full experiments, costs and failures.

Guarantees and limits

Independent auditing verifies the requested geometry. Optimality certification answers a separate question about a specified objective and feasible set. unknown remains unknown. Joint exact search can grow exponentially; the fast path and compressed-file portfolio do not promise a global optimum. A raw shared-format certificate never certifies zlib-optimality.

Stored binary64 values are interpreted exactly. Guarantees concern their piecewise-linear interpolation, not unknown physical signals or clinical features. Event-window modes explicitly use a different contract. Definitions and reasoning · Binary formats.

Research and reuse

Original code and icon: MIT, © 2026 cabal312512. Data retain their own licenses. Relispline is the public name of the project previously developed as CrossGuard; archived records preserve their historical identities.

The public research collection covers the five original software studies and the later file-cost, deterministic-certificate and interruption-revision studies. Manuscripts, full theorem-proof drafts and internal research decision records are kept outside the repository and release attachments.

About

A Python toolkit for geometry-preserving simplification and byte-efficient compression of multi-curve piecewise-linear time series.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages