# Cross-scale relationships: a held-out scale-break challenge

**Status: reproducible synthetic demonstration. No empirical cross-scale finding.**

This H02 benchmark asks whether one power-law relationship predicts withheld observations better than a predeclared alternative with a change of exponent. It fits a relationship between dimensionless ratios, not a probability-distribution tail. Its broken-scaling generator deliberately creates a counterexample to unrestricted scale similarity. A shared exponent or a successful fit would still not establish identical mechanisms, nested universes or a universal fractal.

Python 3.9 or later is sufficient. The demonstration requires no equipment. For empirical use, supply a documented dataset containing comparable quantities, reference scales, sampling rules and uncertainties. Each system must share a defensible mapping; normalizing unrelated images to equal size is not sufficient.

## Run

```sh
python analysis.py
python analysis.py my-measurements.csv
python analysis.py --generate-demo
```

## Data, split and generator

The supplied 37 observations span x=1 to exp(5), approximately 148.413, where x and y are ratios to declared reference scales. The synthetic rule is `log(y)=log(1.7)+0.60 log(x)+0.55 max(0,log(x)-log(20))+epsilon`. Noise epsilon is independent Gaussian with standard deviation 0.04. Thus the true exponent is 0.60 below the prespecified break x=20 and 1.15 above it. Seed: 20261020.

The split is fixed by index before fitting: every fourth observation starting at index two is test data, giving 28 training and nine held-out observations. Both subsets cover both sides of the break. This demonstrates interpolation across a range, not extrapolation to an unseen system. An empirical claim about new systems needs whole-system holdout rather than an interleaved point split.

Required columns are `dataset_kind`, unique `sample_id`, positive `x_ratio`, positive `y_ratio`, `split` (`train` or `test`) and positive `sigma_log_y`. The analysis rejects zeros, nonfinite values, an insufficient sample, or subsets that do not cover both sides of the break. It treats x as exact. Use the blank schema for new observations and record the reference quantities separately.

## Competing models

Model A fits `log(y)=a+b log(x)` with two coefficients. The scale-break baseline fits the continuous hinge `log(y)=a+b log(x)+c max(0,log(x)-log(20))` with three. Both use weighted least squares on training rows only. The break is declared in the script and protocol, never selected using test errors. If another break is scientifically justified, choose it before evaluating the relevant test set and version the protocol.

The script reports coefficients, training and held-out log RMSE, and the held-out mean squared error difference (single power law minus break baseline). Positive difference favors the break model on this particular test sample. The reported standard error of the paired squared-error differences assumes independent test observations and is conditional on fitted training models; it does not include all model-selection or training uncertainty. No p-value or automatic universal verdict is produced.

Actual output is approximately held-out log RMSE 0.191434 for the single power law and 0.021155 for the break baseline. Their held-out MSE difference is 0.036200 with conditional standard error 0.011270. These numbers come from the bundled generated data. The baseline wins because the example contains a break; that is a useful failure demonstration for a too-simple shared-exponent claim.

## Proposed empirical protocol

State the compared observables, their units before normalization, reference scales, justified transformation, eligible systems and finite range. Choose the split and alternatives before testing. Check sampling boundaries and measurement errors, including uncertainty in x and correlations between observations, which this small script omits. Inspect residuals in the original and log domains and publish inconvenient transitions.

A scoped success requires a meaningful predictive advantage on untouched data under defensible uncertainty, with no post hoc breakpoint search. A simpler power law that loses to the scale-break baseline does not support one exponent across that range. A tie is inconclusive. Repeatedly tuning models against the same test rows turns them into training data, so a subsequent confirmation needs new observations.

## Source connections

- `geometry-g-buckingham`: physical similarity and dimensionless groups, DOI 10.1103/PhysRev.4.345.
- `methods-method-powerlaw`: caution and rigorous alternatives for scaling claims, DOI 10.1137/070710111. Its distribution-tail estimators are not used as regressions here.
- `methods-method-loo`: predictive evaluation background, DOI 10.1007/s11222-016-9696-4. This script uses a fixed holdout, not LOO or WAIC.

## Files and provenance

- `analysis.py`: Python 3 standard library only. No network calls or optional packages.
- `synthetic-demo.csv`: generated demonstration, never an experimental observation.
- `blank-measurements.csv`: header-only schema; intentionally contains no data.
- `preregistration-template.json`: editable planning record, not an independently timestamped registration.
- `expected-results.json`: output captured by actually running the bundled demonstration.

Run from any directory using the path to `analysis.py`. An optional CSV argument selects another dataset. The script prints JSON and leaves the input unchanged. `--generate-demo` regenerates the bundled synthetic CSV using a fixed seed; use a copy if you need to preserve a modified demonstration.

The `dataset_kind` field must describe the real provenance of every row. Use `synthetic_demo` for the supplied example. Set `measured` only for observations actually collected and documented. Mixed labels are reported, not silently treated as an experiment. Copy the blank schema before entering observations; never relabel the supplied synthetic values as measurements.

Expected numerical outputs are a software benchmark, not an empirical success criterion. Small last-digit differences across Python implementations can be compared with an absolute tolerance of 1e-7. No script makes a claim about universal memory, a parent universe, new propulsion or a unified theory.
