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},
}
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 timee_ts-0.1.1.tar.gz.
File metadata
- Download URL: timee_ts-0.1.1.tar.gz
- Upload date:
- Size: 477.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebce5c8c903f7098e521e430b4c1228bb091ebdd8b0858de691eff7a8773e7b9
|
|
| MD5 |
70305cdceabaeb9597f61123d290cae1
|
|
| BLAKE2b-256 |
0a5f92fe1be6c2dd9b330ed2402b5e753ed887454230976ce73833fbc672cd86
|
Provenance
The following attestation bundles were made for timee_ts-0.1.1.tar.gz:
Publisher:
publish.yml on automl/timee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
timee_ts-0.1.1.tar.gz -
Subject digest:
ebce5c8c903f7098e521e430b4c1228bb091ebdd8b0858de691eff7a8773e7b9 - Sigstore transparency entry: 2421008564
- Sigstore integration time:
-
Permalink:
automl/timee@a66559cc8f71d70f2d16ace68889bc7630e0c9e6 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/automl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a66559cc8f71d70f2d16ace68889bc7630e0c9e6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file timee_ts-0.1.1-py3-none-any.whl.
File metadata
- Download URL: timee_ts-0.1.1-py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38f8ca288e9d6da07fca72899c17ffe09bc3415cbed011a7a3292da83b87b1f2
|
|
| MD5 |
9b3dd27a787e2eee9dd23d864bbd4097
|
|
| BLAKE2b-256 |
dbc63aee22261d05d81a26e6e471c355a978414ee8c9d64b7dd3586612790d06
|
Provenance
The following attestation bundles were made for timee_ts-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on automl/timee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
timee_ts-0.1.1-py3-none-any.whl -
Subject digest:
38f8ca288e9d6da07fca72899c17ffe09bc3415cbed011a7a3292da83b87b1f2 - Sigstore transparency entry: 2421008897
- Sigstore integration time:
-
Permalink:
automl/timee@a66559cc8f71d70f2d16ace68889bc7630e0c9e6 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/automl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a66559cc8f71d70f2d16ace68889bc7630e0c9e6 -
Trigger Event:
release
-
Statement type: