Data and reproduction#
Running the examples#
The examples live in the examples/gallery folder of the source repository;
they are not installed with the tsseg package. From a checkout:
python -m pip install -e '.[aeon,accelerators]' matplotlib
python -m examples.gallery.jekyll # one example
python -m examples.gallery.run_all --output /tmp/tsseg-gallery
python -m examples.gallery.kmeans_baseline --output /tmp/kmeans.json
Everything runs offline in under a minute. Each example reads a small numeric
snapshot from examples/gallery/data and checks its SHA-256 hash before use;
the motion-capture example uses the MoCap dataset bundled with tsseg. Only the electricity example needs the aeon and accelerators extras (CLaP uses numba).
Without --output, run_all rewrites the figures, tables and records used
by this documentation; building the documentation itself fits nothing.
Every example follows the same conventions:
features are standardised with their mean and standard deviation over the whole sequence, and the reference columns are never passed to the detector;
one detector answers each question, with the settings shown on the page;
the record of each example (downloadable as JSON) holds the features, the scaling, the detector parameters, the complete prediction, the snapshot hash and the versions of the packages used.
Rebuilding the snapshots#
The snapshots are derived from public sources, listed below. Rebuilding them
needs network access, and librosa and pyedflib for the audio and sleep
recordings:
python -m examples.gallery.prepare --cache /tmp/tsseg-gallery/raw
python -m examples.gallery.prepare --only tides --cache /tmp/tsseg-gallery/raw
Downloads are checked against the hashes in
sources.json; a changed
source stops the preparation. OpenAlex counts change as the database is
updated, so they are recorded without a hash. The hashes of the resulting
snapshots are in manifest.json.
Books, genomes, recordings and raw responses stay in the cache and are not
redistributed.
Sources and licences#
The snapshots contain numerical features and reference columns derived from the sources below. Their rights are separate from the AGPL-3.0-only licence of the example code. Sources were retrieved on 3 November 2026 (OpenAlex on 6 November 2026).
Snapshot |
Source and licence |
Transformation and reference |
|---|---|---|
|
Robert Louis Stevenson; Project Gutenberg ebook 43, prepared by David Widger. Source and terms. |
Jekyll and Hyde, main text between the first unindented chapter heading and the Gutenberg end marker. Ten headings removed. Disjoint 300-word windows, final incomplete window omitted; first/third-person pronoun rates. Published chapter positions are references only. Gutenberg lists the text as public domain in the USA. |
|
NOAA CO-OPS, The Battery, station 8518750. API. |
Verified hourly heights and astronomical predictions, 2012-10-15 through 2012-11-12, UTC, metres, MLLW. Exact complete timestamp join. Residual = observation − prediction. Historical storm dates are independently documented by NOAA/NWS. |
|
NCBI RefSeq NC_000932.1, Arabidopsis thaliana chloroplast. |
GC and A/C/G/T fractions in disjoint 400-base windows; final 78 bases omitted from 154,478. Seven rRNA features parsed separately from the frozen GenBank record, with 1-based inclusive coordinates and strands. Only GC is fitted. |
|
Yearly counts, 1990–2025, of works whose title matches “climate justice”, “loss and damage”, “just transition” or “climate emergency” (OpenAlex title search, with its stemming), and of works whose title matches climate. Rate = 1,000 × count / climate titles; log(1 + rate) is fitted. The query URLs are in |
|
(bundled with tsseg) |
Carnegie Mellon University, CMU Graphics Lab Motion Capture Database, subject 86, trial 01; free for research, acknowledgement requested (see |
First rotation axis of the right and left humerus and femur, 120 frames per second, 4,579 frames. Activity labels as used by Time2State (Wang et al., 2023); activity names from the segmentation ground truth of Barbič et al. (2004). Labels are never fitted. |
|
National Energy System Operator, Environmental Defense Fund and University of Oxford, Carbon Intensity API. CC BY 4.0. |
Every half-hour in January 2024. Three contiguous API requests per endpoint, overlapping boundary records deduplicated; extra preceding interval discarded. Generation percentages are features. Actual carbon intensity is a held-out column from a separate endpoint, partly derived from mix and therefore not an independent label. Met Office storm dates are external context. |
|
Zohar Jackson and contributors, Free Spoken Digit Dataset v1.0.10. CC BY-SA 4.0. The derived snapshot and audio-derived feature exports retain these terms. |
120 distinct clips: Jackson, Nicolas, Theo; all ten digits and takes 5–8. Six disclosed 20-clip blocks, balanced digits, no inserted silence. Edge silence trimmed at 30 dB below peak. Mean MFCCs 1–12 (coefficient 0 excluded), 24 mel bands, 256-sample FFT, 80-sample hop, 8 kHz. Filename references withheld; three speakers supplied to TICC. |
|
Kemp and colleagues, Sleep-EDF Expanded v1.0.0, PhysioNet, DOI 10.13026/C2X676. Open Data Commons Attribution License v1.0. |
PSG SC4001E0, expert hypnogram SC4001EC. Fixed recording-clock 23:00–08:00, 1,080 30-second epochs. Welch spectral features (4-second windows) and recorded EMG envelope; seven fitted features, additional channels retained. Expert R&K stages 3 and 4 merged as deep NREM; no unscored epoch in the selected interval. The supplied record date is a recording coordinate, not a population-level identifier. |
Only the optional preparation step reads the original book, genome, EDF and WAV files; they stay in an external cache and are not redistributed. The derived speech features keep the CC BY-SA 4.0 terms of their source.