TIMEE: Time Series Classification via In-Context Learning
TIMEE is a pretrained transformer for time series classification. It classifies test series in a single forward pass given labeled training examples — no per-dataset training or fine-tuning required.
Installation
pip install timee-ts
Requirements: Python ≥ 3.10, PyTorch ≥ 2.0.
Quickstart
from timee import TimeeClassifier
import numpy as np
clf = TimeeClassifier.from_pretrained() # downloads from HuggingFace on first use
# X: (n_samples, n_channels, seq_len) float32
X_train = np.random.randn(20, 1, 256).astype(np.float32)
y_train = np.array([0, 1] * 10)
X_test = np.random.randn(5, 1, 256).astype(np.float32)
predictions, probabilities = clf.predict(X_train, y_train, X_test)
Labels can be any type (int, str, etc.). Datasets with more than 10 classes are
handled automatically via one-vs-rest.
API
TimeeClassifier.from_pretrained(path, device=None, use_ensemble=True)
Loads a checkpoint from a directory containing model.safetensors.
| Parameter | Default | Description |
|---|---|---|
path |
"liamsbhoo/timee" |
Local directory or HuggingFace Hub repo ID. |
device |
auto | "cuda", "cpu", or torch.device. Defaults to CUDA > MPS > CPU. |
use_ensemble |
True |
4-member preprocessing ensemble (interpolate×{256,512} × {raw, diff}). Set False for faster single-pass inference. |
clf.predict(X_train, y_train, X_test)
Returns (predictions, probabilities):
predictions:(n_test,), same type asy_trainprobabilities:(n_test, n_classes), rows sum to 1
Multivariate Support (beta)
Note: TIMEE is trained and evaluated as a univariate classifier — multivariate is not its focus (yet).
As mentioned in the paper, TIMEE supports multivariate input through two mechanisms:
- channel-independent: each channel is classified separately and the per-channel class probabilities are averaged.
- late-channel-mixing: channels are embedded separately before going through an attention pooling layer (acting as a mixer).
Mechanism (1) is already implemented in TimeeClassifier: pass (n_samples, n_channels, seq_len) input (use n_channels=1 for the univariate case) and it averages over channels automatically.
Mechanism (2) is implemented as TimeeMultivariateClassifier, which fuses channels via attention pooling and takes the same (n_samples, n_channels, seq_len) input.
from timee import TimeeMultivariateClassifier
clf = TimeeMultivariateClassifier.from_pretrained()
predictions, probabilities = clf.predict(X_train, y_train, X_test)
Citation
@misc{küken2026timeeendtoendtimeseries,
title={TimEE: End-to-end Time Series Classification via In-Context Learning},
author={Jaris Küken and Shi Bin Hoo and Martin Mráz and Frank Hutter and Lennart Purucker},
year={2026},
eprint={2607.07500},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2607.07500},
}
Metadata
Release files for timee-ts 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| timee_ts-0.1.1.tar.gz | 477.8 kB | With provenance | Details for timee_ts-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| timee_ts-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for timee_ts-0.1.1-py3-none-any.whl |
Total release size: 502.9 kB
Release files / timee_ts-0.1.1.tar.gz
| Download URL | timee_ts-0.1.1.tar.gz |
|---|---|
| Size | 477.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ebce5c8c903f7098e521e430b4c1228bb091ebdd8b0858de691eff7a8773e7b9
|
|
BLAKE2b-256 checksum How to use checksums |
0a5f92fe1be6c2dd9b330ed2402b5e753ed887454230976ce73833fbc672cd86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.
Transparency logRelease files / timee_ts-0.1.1-py3-none-any.whl
| Download URL | timee_ts-0.1.1-py3-none-any.whl |
|---|---|
| Size | 25.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
38f8ca288e9d6da07fca72899c17ffe09bc3415cbed011a7a3292da83b87b1f2
|
|
BLAKE2b-256 checksum How to use checksums |
dbc63aee22261d05d81a26e6e471c355a978414ee8c9d64b7dd3586612790d06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.
Transparency logSecurity for timee-ts 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for timee_ts-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.