Implementation of TACO: A Lightweight Tree-Based Approximate Compression Method for Time Series
Project description
taco-compression
This is the official implementation of the TACO compression algorithm for time series [1].
Installation
Please install via pip:
pip install tacocompression
Usage
There are two usage modes, one as a command line tool operating on files, the other as callables from within python.
Command Line
Please use python -m tacocompression to (de)compress your time series from the command line interface. This
application takes 4 named keyword arguments and at least one additional argument specifying the input(s). These inputs
are the paths to the files/directory of the (compressed) time series. You can either specify a directory from which all
csv files are read...
python -m tacocompression -m=c -o=compressed time_series
... or by passing the paths to the files directly.
python -m tacocompression -m=c -o=. data/time_series_1.csv data/time_series_2.csv
Each file must contain a single column interpreted as a univariate time series. We assume row 0 is the header. The compressed data is saved in csv files as well.
The keyword arguments are
- mode (short: m) Use
cto compress anddto decompress. - output (short: o) Provide a directory to save the outputs to.
- decimals (short: d) Precision of the reconstruction, i.e., number of decimals recoverable during decompression.
- pairing_function (short: p) One of "rosenberg", "szudzik", and "cantor".
To decompress the above time series, use
python -m tacocompression -m=d -o=time_series compressed
respectively
python -m tacocompression -m=d -o=data compressed_time_series_1.csv compressed_time_series_2.csv
As a Callable
from tacocompression import compress, decompress
# 2 univariate time series, length 10 and 8:
time_series = [[0.0, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9], [8.8, 7.7, 6.6, 5.5, 4.4, 3.3, 2.2, 1.1]]
compressed = compress(time_series, "szudzik", 1)
reconstructed = decompress(compressed, "szudzik")
assert time_series == reconstructed
[1] Bauer, André. TACO: A Lightweight Tree-Based Approximate Compression Method for Time Series. In: Proceedings of the 14th International Conference on Data Science, Technology and Applications (DATA 2025), pages 182-190. 2025.
Project details
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 tacocompression-0.9.3.tar.gz.
File metadata
- Download URL: tacocompression-0.9.3.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cdcb4747d0eb07329f5b4fea7a81772751cf13c1c9fefabacbe282f61b2fac7
|
|
| MD5 |
a05306a23b912deaca5e404a0ed18235
|
|
| BLAKE2b-256 |
4f4cbd76e100f3ac76056d6b12da7b97794323855c51ab354dc16234c8b0c3b0
|
File details
Details for the file tacocompression-0.9.3-py3-none-any.whl.
File metadata
- Download URL: tacocompression-0.9.3-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfb86d681a4ee217df7bb94e4bfba5f0b476247c56b9679b2cff9aa144011de7
|
|
| MD5 |
13afb7d06d23519d76eec3572987e872
|
|
| BLAKE2b-256 |
c05f11e8f7c2143052802e55864746f400f04edca902211a4d4b96b4a2426aac
|