Drop a CSV. Get three numbers. Know if your system is stable, heading for trouble, or already broken.
Works on climate data, disease outbreaks, earthquakes, stock markets, typhoons, LLMs — anything that produces a time series.
pip install numpy scipy
python o_hat.py examples/enso.csvOutput:
======================================================
O-HAT STRUCTURAL MEASUREMENT
======================================================
Data points : 905
Baseline : 181 points
Window : 45 points
---
Curl : -2.31
Helicity : 18.45
Baseline skew: 0.5231
Outbreak skew: 1.2187
---
BALANCE RATIO: 2.33x
SYSTEM TYPE : CONTINUOUS FLOW
======================================================
That's it. One command, one result.
| Metric | What It Captures | Physical Meaning |
|---|---|---|
| curl | Directional change rate | Is the system accelerating toward or away from equilibrium? |
| helicity | Total variation | How much structural complexity is in the outbreak? |
| balance | Skewness ratio (outbreak / baseline) | How far is the system from its normal state? |
| Balance Ratio | System Type | Examples |
|---|---|---|
| > 20× | SUPER-PULSE | 1989 Quebec geomagnetic storm |
| 5–15× | PULSE | Earthquakes (M5+) |
| 1.5–4× | CONTINUOUS FLOW | ENSO, COVID-19 outbreaks |
| < 1.5× | REGIME SATURATION | Seasonal forcing (typhoon seasons) |
The same three numbers classify seven different types of dynamical systems across twelve domains — climate, epidemiology, seismology, finance, space weather, LLMs, and more.
python o_hat.py your_data.csv
python o_hat.py your_data.csv --window 50 --baseline 200
python o_hat.py your_data.csv --quiet # machine-readable output
python o_hat.py your_data.csv --plot # classification chart
python o_hat.py your_data.csv --sensitivity # window stability verificationAny single-column CSV works. Timestamps not required — just values, one per row, time-ordered.
Worried about cherry-picking? --sensitivity sweeps window and baseline sizes across 50%–150% (121 combinations) and reports a stability band:
python o_hat.py examples/enso.csv --window 60 --baseline 300 --sensitivityIf your balance ratio stays within a narrow band across all window sizes, the structural signal is genuine — not an artifact of parameter tuning. See §9 of the classification spectrum for methodology and cross-domain results.
Most tools are domain-specific. Climate scientists use one set of metrics. Epidemiologists use another. Seismologists use a third.
Ô is substrate-independent. It measures structural properties that exist in any dynamical system, regardless of what the numbers represent. The math doesn't care if you're measuring ocean temperatures, case counts, or stock prices.
Built from empirical cross-domain validation across 12 domains. See docs/classification-spectrum-v2.md for the full framework.
If you use this in research, please cite:
DR & MM. "O-Hat v2.1: Universal Structural Classifier — Dual-Mode Architecture (Balance + Helicity), 10-Domain Cross-Validation, C-MAPSS Sliding-Window Analysis." 2026. Zenodo: 10.5281/zenodo.21431348
MIT — use it, fork it, break it, improve it.