sklearn transformers for working with time series data
Project description
time-series-transformers
scikit-learn transformers for working with time series data.
time-series-transformers is a collection of scikit-learn-compatible
transformers for common time series preprocessing tasks — scaling, log and signed-power
transforms, differencing, detrending, and trend extraction. Every transformer operates
directly on pandas DataFrames and preserves their index and column structure, follows the
familiar fit / transform API, and — where it makes sense — implements inverse_transform
so you can map results back to the original scale.
Installation
pip install time-series-transformers
Usage
All transformers accept and return pandas DataFrames:
import pandas as pd
from time_series_transformers import (
DifferenceTransformer,
InvertiblePipeline,
LogTransformer,
)
data = pd.DataFrame({"price": [100.0, 102.0, 101.5, 105.0, 110.0]})
# Chain transforms; InvertiblePipeline undoes them in reverse order.
pipeline = InvertiblePipeline(
[
("log", LogTransformer()),
("difference", DifferenceTransformer()),
]
)
transformed = pipeline.fit_transform(data)
recovered = pipeline.inverse_transform(transformed) # back to the original prices
The package provides:
- Scaling —
PandasStandardScaler,PandasMinMaxScaler - Transforms —
LogTransformer(log / signed-power) - Stationarity —
DifferenceTransformer,DetrendTransformer,HamiltonFilterTransformer - Composition —
InvertiblePipeline,DataFrameFeatureUnion
Contributing
Contributions are welcome! This project uses pixi to manage its development environment.
- Fork and clone the repository.
- Install the environment:
pixi install - Create a feature branch and make your changes, adding tests where appropriate.
- Run the checks before opening a pull request:
pixi run test # run the test suite pixi run mypy # type-check pixi run pre-commit # lint and format
- Open a pull request against
mainwith a clear description of your change.
Please make sure the test suite passes and new code is covered by tests.
License
Released under the MIT License.
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 time_series_transformers-0.1.1.tar.gz.
File metadata
- Download URL: time_series_transformers-0.1.1.tar.gz
- Upload date:
- Size: 50.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee67517433b67c3a1356e926972c3b82d122a96093fcb566f02bb950fe678cd9
|
|
| MD5 |
d906adc0686c7e25779e8edf5a57eaaf
|
|
| BLAKE2b-256 |
ba14340a291781aaec5a49de32a37f998928c7874aca9c9c2ac1c1786ac28421
|
Provenance
The following attestation bundles were made for time_series_transformers-0.1.1.tar.gz:
Publisher:
release.yml on jessegrabowski/time_series_transformers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
time_series_transformers-0.1.1.tar.gz -
Subject digest:
ee67517433b67c3a1356e926972c3b82d122a96093fcb566f02bb950fe678cd9 - Sigstore transparency entry: 1786714582
- Sigstore integration time:
-
Permalink:
jessegrabowski/time_series_transformers@6dec450fb1cade8766ac9ca217f5b6db5fb591a3 -
Branch / Tag:
- Owner: https://github.com/jessegrabowski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6dec450fb1cade8766ac9ca217f5b6db5fb591a3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file time_series_transformers-0.1.1-py3-none-any.whl.
File metadata
- Download URL: time_series_transformers-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b56cbe3c595243f74a6327d6433469126531eef7dee3460fc58cacf148063a4
|
|
| MD5 |
ec6d8c9f132423b19ed86685c0230627
|
|
| BLAKE2b-256 |
d3e7d56647464d6ec03c7b91d4590c7a372d8b0e14267047d6082e16aadb60c9
|
Provenance
The following attestation bundles were made for time_series_transformers-0.1.1-py3-none-any.whl:
Publisher:
release.yml on jessegrabowski/time_series_transformers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
time_series_transformers-0.1.1-py3-none-any.whl -
Subject digest:
6b56cbe3c595243f74a6327d6433469126531eef7dee3460fc58cacf148063a4 - Sigstore transparency entry: 1786714610
- Sigstore integration time:
-
Permalink:
jessegrabowski/time_series_transformers@6dec450fb1cade8766ac9ca217f5b6db5fb591a3 -
Branch / Tag:
- Owner: https://github.com/jessegrabowski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6dec450fb1cade8766ac9ca217f5b6db5fb591a3 -
Trigger Event:
release
-
Statement type: