Study reproduction workflows
The xpectra-study command groups the analyses behind the published study. List them with
xpectra-study --list; run one with xpectra-study <name>. Results are written to
results/ and figures to figures/; intermediate artifacts are cached under
.cache/xpectra/, so reruns are incremental.
Workflow catalog
Workflow |
Description |
|---|---|
|
Validate the stack on a cheap subsample |
|
Calibration metrics and reliability diagrams |
|
Random-split vs leave-one-study-out generalization |
|
OOD detection and risk–coverage sweeps |
|
Semi-supervised learning experiment |
|
Carbonyl index and unknown-pool composition |
|
Study-probe and UMAP batch-effect diagnostics |
|
CNN / TabNet self-supervised LOSO |
|
Deeper 1-D ResNet LOSO |
|
Domain-adversarial LOSO |
|
Contrastive encoder LOSO and cached embeddings |
|
Field-spectrum clustering |
|
External-data augmentation experiments |
|
Corrected nested deep-model reanalysis + figures |
|
Contrastive-transfer diagnostics + figures |
|
Degradation-structure diagnostics + figures |
|
Collate result CSVs into |
The nb2 / nb3 / nb4 analysis and figure steps are also exposed as standalone console
scripts (xpectra-nb2-corrected, xpectra-nb3-analysis, …) for convenience.
Route selection
The deep-diagnostic and external-data workflows accept --route {norm,deriv1,deriv2}
(default norm) and prefix every output with the route name, so runs on different routes
coexist:
xpectra-study deep-ssl --route norm # -> results/norm_deep_ssl_loso.csv
xpectra-study deep-ssl --route deriv1 # -> results/deriv1_deep_ssl_loso.csv
The classical sweeps (calibrate, loso, ood, ssl) evaluate all three routes at once and
write a single file carrying a route column instead (see Preprocessing routes & the route-prefix convention).
Dependencies between workflows
Some workflows read another’s output:
contrastivetrains the encoder and writes the cached embeddings thatnb3-analysis,degradation,cluster-robustness, andnb4-analysisconsume.domain-distancereads theopenspecy-loso,simple-redundancy, andawi-scalingresults, so run those first.nb2-figures/nb3-figures/nb4-figuresread the corresponding*-analysistables.
A typical full reproduction, in dependency order:
xpectra-process-raw
xpectra-study calibrate
xpectra-study loso
xpectra-study weathering
xpectra-study ood
xpectra-study ssl
xpectra-study batch-effect
xpectra-study openspecy-loso
xpectra-study data-scaling
xpectra-study simple-redundancy
xpectra-study awi-scaling
xpectra-study domain-distance
xpectra-study deep-ssl
xpectra-study dann
xpectra-study resnet
xpectra-nb2-corrected --force
xpectra-nb2-figures
xpectra-study contrastive
xpectra-nb3-analysis
xpectra-nb3-figures
xpectra-study cluster-robustness
xpectra-nb4-analysis
xpectra-nb4-figures
xpectra-study report
Reference datasets
The processed spectra combine four public core datasets plus three external reference libraries. Please cite the original sources if you use this data:
Core — Kedzierski et al. (2019); Jung et al. (2018); De Frond et al. (2021, SLoPP/SLoPP-E); Villegas-Camacho et al. (2024). External — Cowger et al. (2021, Open Specy); Primpke et al. (2018, siMPle); Primpke et al. (2024, AWI high-throughput).