From b2d37341528ce4b9948e73ac788587e80f728e0e Mon Sep 17 00:00:00 2001 From: maxime Date: Mon, 16 Nov 2026 15:49:05 +0100 Subject: [PATCH] README: how to build the dataset Co-Authored-By: Claude Opus 5.5 --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 9931f4b..48e0ff4 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,16 @@ Learned detectors for AIMsight: models trained on the reviewed labels to tell, a - **Evaluation**: leave one station out; the measure of `detectors/bench/score.py` (found, correct, per family and per instant), against the rules on the same stations. - **Steps**: dataset, evaluator (reproducing the rules' figures first), gradient boosting baseline, the PyTorch model, pre-training compared with and without, decoding into episodes. +## Use + +```bash +uv venv .venv && uv pip install -p .venv -r requirements.txt +.venv/bin/python test_dataset.py ~/aimsight-detectors +.venv/bin/python dataset.py --detectors ~/aimsight-detectors --data ~/aimsight-data/data --labels ~/aimsight-labeling/auto --out cache +``` + +`dataset.py` (step 1, ~2 min): one `cache/.npz` per labelled station, over its labelled range as the benchmark reads it: `xs` [instant, sensor, feature], `xc` [instant, feature], `y` [instant, family] with the conventions of `bench/score.py` (its labelled instants per family are the benchmark's, exactly). NaN where a value does not exist (a 1 h window at a 4 h step, no temperature, no image quality outside LENZSPITZE). + ## Contracts - Reads the measurements through `detectors/scripts/data.py`, the reading of the benchmark; the labels from `labeling/auto/`; the data from `data/` (read-only). Paths are passed as arguments.