Skip to main content

End-to-end time series classification via in-context learning

Project description

TIMEE: Time Series Classification via In-Context Learning

arXiv HuggingFace License

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 as y_train
  • probabilities: (n_test, n_classes), rows sum to 1

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},
}

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

timee_ts-0.1.0.tar.gz (475.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timee_ts-0.1.0-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file timee_ts-0.1.0.tar.gz.

File metadata

  • Download URL: timee_ts-0.1.0.tar.gz
  • Upload date:
  • Size: 475.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for timee_ts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 62392d1e701b681de7ee81e4231541ff6baa755535d1eb5a5d5f03a0afa643a0
MD5 8b4e52a66ca689dc831a31e8f275f146
BLAKE2b-256 4a4aa42cb6341f5417a337657b251d5d008dee834a9652c6a27981d2611515f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for timee_ts-0.1.0.tar.gz:

Publisher: publish.yml on automl/timee

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file timee_ts-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: timee_ts-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for timee_ts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b033ba044a03fb04421730e72cc9e29fb5c43aaf2cde5b3d1cd06829796b2c8
MD5 ec31ee7f8f7d122d86f5706bce736a0f
BLAKE2b-256 ad66a79b2f0ff09b6692b0c84ae1e31f48c0aabeee726b72ebaa0cc486fc3608

See more details on using hashes here.

Provenance

The following attestation bundles were made for timee_ts-0.1.0-py3-none-any.whl:

Publisher: publish.yml on automl/timee

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page