# WindsorML dataset splits This directory provides deterministic train/validation/test assignments for the [WindsorML](https://huggingface.co/datasets/neashton/windsorml) dataset. The authoritative assignments are stored in [`manifest.json`](manifest.json) as a flat JSON object. Keys follow the pattern `{split_name}_{train,val,test}`, and each value is a numerically sorted list of identifiers matching the top-level `run_N` convention. The aggregate WindsorML tables describe 355 Windsor-body variants, indexed from `run_0` through `run_354`. At the source revision used to construct this package, per-run STL and image assets were available for `run_0` through `run_349`; the treatment of the five remaining cases is documented below. ## Splits at a glance | Split | Type | Train | Validation | Test | Intended evaluation | |---|---:|---:|---:|---:|---| | `full` | In-distribution | 284 | 35 | 36 | Seed-42 random baseline, approximately 80/10/10 | | `medium` | In-distribution | 95 | 35 | 36 | Intermediate data efficiency | | `scarce` | In-distribution | 47 | 35 | 36 | Low-data evaluation | | `super_scarce` | In-distribution | 8 | 35 | 36 | Extreme low-data evaluation | | `geometry` | OOD | 248 | 36 | 71 | STL-surface geometry extrapolation | | `high_drag` | OOD | 248 | 36 | 71 | High-drag extrapolation | | `low_drag` | OOD | 248 | 36 | 71 | Low-drag extrapolation | | `image_wake` | OOD | 248 | 36 | 71 | Image-derived wake extrapolation | The data-efficiency training sets form a strict nested sequence: `super_scarce_train ⊂ scarce_train ⊂ medium_train ⊂ full_train` They use the same validation and test assignments. For every out-of-distribution (OOD) family, validation is sampled from the training-side population; the held-out extreme is reserved for final testing. ## Relation to the paper split The WindsorML paper reports a 60/20/20 partition for its preliminary machine- learning evaluation but does not publish the case-membership lists. The `full` family here is therefore a separate, reproducible seed-42 benchmark with an approximately 80/10/10 ratio. It should not be described as a reconstruction of the paper's preliminary partition. ## Using the committed manifest Normal benchmark use requires only the committed manifest. Regenerating the splits is not required. ```python import json from pathlib import Path manifest = json.loads(Path("splits/manifest.json").read_text()) train_ids = manifest["geometry_train"] val_ids = manifest["geometry_val"] test_ids = manifest["geometry_test"] ``` Change the `geometry` prefix to `full`, `medium`, `scarce`, `super_scarce`, `high_drag`, `low_drag`, or `image_wake` to select another family. Download only the split package with: ```bash hf download neashton/windsorml \ --type dataset \ --include "splits/**" \ --local-dir ./windsorml ``` Validation data may be used for model and hyperparameter selection. Test data should be reserved for final evaluation and should not inform normalization, feature design, or repeated visual inspection during development. ## Construction principles 1. **Reproducible baseline.** The `full` family is a committed seed-42 random assignment over all 355 identifiers. 2. **In-distribution validation.** OOD validation cases are selected from the training-side population rather than the extreme test region. 3. **Nested data-efficiency subsets.** Smaller training sets are strict subsets of larger sets, with validation and test held fixed. 4. **Direct geometry comparison.** The geometry OOD score is computed from STL surfaces rather than inferred only from geometry parameters. 5. **Dataset-defined physical quantities.** Drag families use the published constant-reference-area force table. 6. **Flow-structure information.** The image-wake family uses fixed velocity views rather than an integrated coefficient. 7. **Explicit missing-data treatment.** Observed and estimated metric values are identified in the distributed CSVs. 8. **Auditability.** The manifest is distributed with the derived metrics, scripts, figures, LaTeX source, and PDF methods report used to document it. ## Split definitions ### `full` The baseline constructs `torch.randperm(355)` with seed 42, assigns the first 284 entries to training, the next 35 to validation, and the final 36 to testing, then sorts each stored list numerically. The identifiers are committed directly in the generator, so PyTorch is not a runtime dependency. ### `medium`, `scarce`, and `super_scarce` These families retain `full_val` and `full_test` while reducing the training population to 95, 47, and 8 cases. A greedy max-min procedure constructs one nested ordering in standardized force/geometry feature space using `cd`, `cl`, and the columns present in the aggregate geometry table. The paper defines seven CAD variables. The current root-level `geo_parameters_all.csv` contains six of those variables plus `frontal_area`; `ratio_length_front_rear` is present in per-run geometry CSVs but absent from the aggregate table. The nested selection uses the aggregate columns actually available. The STL-based geometry OOD family is independent of this omission. ### `geometry` The geometry family uses [`chamfer_metrics.csv`](chamfer_metrics.csv). Each available `run_N/windsor_N.stl` surface is sampled with 4,096 deterministic area-weighted points. Point clouds remain in the shared dataset coordinate frame and are scaled by the global median STL bounding-box diagonal. Pairwise surface difference is measured with symmetric Chamfer RMS distance. For each run, the OOD score is the mean distance to its ten nearest neighbouring geometries. The 71 highest-scoring cases form `geometry_test`; 36 validation cases are deterministically selected from the complementary population, leaving 248 training cases. ### `high_drag` and `low_drag` These families rank all cases by `cd` from the root-level `force_mom_all.csv`, whose constant reference area makes the coefficients directly comparable. `high_drag` holds out the largest 71 values, while `low_drag` holds out the smallest 71. Validation is sampled from the complementary population in both cases. ### `image_wake` The image-wake score uses two near-centreline constant-z velocity images and three near-base constant-x images for each observed run. A fixed wake crop and colour/intensity measure estimate the low-speed area in each view. The 71 largest scores form `image_wake_test`. ![Split diagnostics](split_diagnostics.png) ![Geometry-score examples](geometry_score_examples.png) ![Image-wake-score examples](wake_score_examples.png) ## Current per-run asset coverage At WindsorML revision `bb721834e681a9a8329c42288c1514d6ce617547`, the aggregate force and geometry tables contain all 355 identifiers, but the per-run STL and targeted PNG files for `run_350` through `run_354` are absent. Their geometry and image-wake scores are estimated from the five nearest observed runs in standardized force/aggregate-geometry space. [`chamfer_metrics.csv`](chamfer_metrics.csv) and [`image_metrics.csv`](image_metrics.csv) record an observed flag and the neighbour identifiers used for every estimate. They contain 350 direct observations and five estimated rows each. The committed manifest is the versioned benchmark assignment; future metric revisions should be released explicitly rather than silently changing this manifest. ## Reproducibility The committed [`manifest.json`](manifest.json) is the source of truth. The commands below are provided to audit or rebuild the artifacts. They were prepared against the WindsorML revision given above. Install the lightweight generation and plotting dependencies: ```bash python3 -m pip install numpy matplotlib pillow ``` From the dataset repository root, download the aggregate source tables and regenerate the manifest and diagnostic plot: ```bash python3 splits/download_hf_inputs.py --output-dir data python3 splits/generate_splits.py python3 splits/visualize_splits.py ``` The commands above use the committed Chamfer and image metrics. To recompute those metrics and recreate the example figures, keep large STL and PNG inputs outside the repository: ```bash ASSET_ROOT=../windsorml_hf_assets python3 splits/download_hf_inputs.py --output-dir "$ASSET_ROOT" \ --include-stls --include-wake-images --include-geometry-images \ --workers 6 --allow-missing python3 splits/compute_chamfer_splits.py --data-root "$ASSET_ROOT" \ --output-dir /tmp/windsorml_chamfer_4096 --samples 4096 \ --workers 16 --sample-workers 2 --runs all --allow-missing cp /tmp/windsorml_chamfer_4096/chamfer_metrics.csv \ splits/chamfer_metrics.csv python3 splits/compute_image_metrics.py --asset-root "$ASSET_ROOT" \ --data-root "$ASSET_ROOT" --output splits/image_metrics.csv WINDSORML_DATA_ROOT="$ASSET_ROOT" python3 splits/generate_splits.py WINDSORML_DATA_ROOT="$ASSET_ROOT" python3 splits/visualize_splits.py python3 splits/create_example_figures.py --asset-root "$ASSET_ROOT" \ --force-root "$ASSET_ROOT" ``` Full Chamfer recomputation additionally requires SciPy and trimesh: ```bash python3 -m pip install scipy trimesh ``` Rebuild the PDF methods report with: ```bash latexmk -pdf -cd splits/README.tex ``` The generated manifest remains a flat mapping such as: ```json { "full_train": ["run_0", "run_1"], "full_val": ["run_8"], "full_test": ["run_7"] } ``` The shortened lists above illustrate the format only; use the committed manifest for the complete assignments.