Skip to content

Audit your measured data

twindex audit searches for two parameters consistent with your sensors and noise bound. A certified gap L rules out a uniform absolute-error guarantee smaller than L/2 for the target parameter. Failure to find twins does not prove recoverability or inconsistency of the data.

Install twindex[search]. Supply a CSV with exactly two columns x,y, one sensor per row. Coordinates and measurements are parsed as exact rationals: finite decimals and fractions are both accepted. Coordinates must be distinct and strictly between 0 and 1.

For example, save this as measurements.csv:

x,y
1/4,3/16
1/2,1/4
3/4,3/16

These data come from the manufactured solution u = x(1−x), with constant q = θ₀ = 2, f(u) = u, and g(x) = 2 + 2x − 2x². Run:

twindex audit --data measurements.csv --epsilon 1/1000 --degree 0 \
  --source 2,2,-2 --power 1:1 --prior 0,10 --estimate 2 \
  --output evidence --n 24
twindex check evidence/seed.json evidence/pair.json

The output gives an exact rational uncertainty lower bound and paths to replayable certificates. seed.json proves one compatible parameter; pair.json proves the target gap. The reported ±L/2 is a worst-case lower bound, not a confidence interval, posterior, or error upper bound. It applies to the supplied model, data, prior and noise assumption. It does not validate the physical model or noise assumption.

The default model is cubic Bernstein q (four parameters), source g = 1, and f(u) = u³. --degree d selects d+1 Bernstein parameters (0 ≤ d ≤ 20). --source lists polynomial coefficients in increasing monomial order. Repeat --power m:a to specify f(u) = Σ a uᵐ, with odd m ≤ 15 and a ≥ 0. Repeat --prior lo,hi once per parameter or supply it once to broadcast. --target k selects the parameter index (default 0). --estimate lists comma-separated parameters; without it, a damped numerical fit starts at the prior midpoint. An estimate that does not certify also triggers a fit.

--n, --rounds, and --depth control numerical resolution, local search, and exact Bernstein subdivision. The fit and search are heuristics; every reported compatible witness and gap must pass exact replay. Exit code 0 means a positive gap certified; 2 means no seed or positive gap certified, leaving recoverability undecided. Invalid command arguments are reported as errors. If only a seed certifies, the tool writes that certificate and says so. Use a fresh output directory for each audit so prior evidence remains distinguishable.

For an upper bound, pass a generated certificate to twindex sivia:

twindex sivia evidence/seed.json --output evidence/paving.json --max-leaves 16
twindex check evidence/paving.json

A paving covers the full prior, retaining unresolved boxes. Its upper bound can remain equal to the prior width; that gives no new recoverability result. See the sensor study for measured costs and limitations.