universal-physics-tensor 0.45.2 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -27
- package/dist/atlas/applicability.d.ts +108 -0
- package/dist/atlas/applicability.d.ts.map +1 -0
- package/dist/atlas/applicability.js +301 -0
- package/dist/atlas/applicability.js.map +1 -0
- package/dist/atlas/association.d.ts +92 -0
- package/dist/atlas/association.d.ts.map +1 -0
- package/dist/atlas/association.js +112 -0
- package/dist/atlas/association.js.map +1 -0
- package/dist/atlas/benchmark/backend-shapes.d.ts +47 -0
- package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -0
- package/dist/atlas/benchmark/backend-shapes.js +58 -0
- package/dist/atlas/benchmark/backend-shapes.js.map +1 -0
- package/dist/atlas/benchmark/baselines.d.ts +64 -0
- package/dist/atlas/benchmark/baselines.d.ts.map +1 -0
- package/dist/atlas/benchmark/baselines.js +112 -0
- package/dist/atlas/benchmark/baselines.js.map +1 -0
- package/dist/atlas/benchmark/leakage.d.ts +56 -0
- package/dist/atlas/benchmark/leakage.d.ts.map +1 -0
- package/dist/atlas/benchmark/leakage.js +100 -0
- package/dist/atlas/benchmark/leakage.js.map +1 -0
- package/dist/atlas/benchmark/loader.d.ts +56 -0
- package/dist/atlas/benchmark/loader.d.ts.map +1 -0
- package/dist/atlas/benchmark/loader.js +104 -0
- package/dist/atlas/benchmark/loader.js.map +1 -0
- package/dist/atlas/benchmark/run-atlas.d.ts +72 -0
- package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -0
- package/dist/atlas/benchmark/run-atlas.js +210 -0
- package/dist/atlas/benchmark/run-atlas.js.map +1 -0
- package/dist/atlas/benchmark/stats.d.ts +90 -0
- package/dist/atlas/benchmark/stats.d.ts.map +1 -0
- package/dist/atlas/benchmark/stats.js +159 -0
- package/dist/atlas/benchmark/stats.js.map +1 -0
- package/dist/atlas/benchmark/study.d.ts +120 -0
- package/dist/atlas/benchmark/study.d.ts.map +1 -0
- package/dist/atlas/benchmark/study.js +192 -0
- package/dist/atlas/benchmark/study.js.map +1 -0
- package/dist/atlas/benchmark/types.d.ts +79 -0
- package/dist/atlas/benchmark/types.d.ts.map +1 -0
- package/dist/atlas/benchmark/types.js +46 -0
- package/dist/atlas/benchmark/types.js.map +1 -0
- package/dist/atlas/composition-table.d.ts +55 -0
- package/dist/atlas/composition-table.d.ts.map +1 -0
- package/dist/atlas/composition-table.js +133 -0
- package/dist/atlas/composition-table.js.map +1 -0
- package/dist/atlas/conventions.d.ts +63 -0
- package/dist/atlas/conventions.d.ts.map +1 -0
- package/dist/atlas/conventions.js +93 -0
- package/dist/atlas/conventions.js.map +1 -0
- package/dist/atlas/coverage.d.ts +93 -0
- package/dist/atlas/coverage.d.ts.map +1 -0
- package/dist/atlas/coverage.js +69 -0
- package/dist/atlas/coverage.js.map +1 -0
- package/dist/atlas/derivation.d.ts +137 -0
- package/dist/atlas/derivation.d.ts.map +1 -0
- package/dist/atlas/derivation.js +190 -0
- package/dist/atlas/derivation.js.map +1 -0
- package/dist/atlas/derive-evidence.d.ts +218 -0
- package/dist/atlas/derive-evidence.d.ts.map +1 -0
- package/dist/atlas/derive-evidence.js +225 -0
- package/dist/atlas/derive-evidence.js.map +1 -0
- package/dist/atlas/diffusion/bridges-closure.d.ts +63 -0
- package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -0
- package/dist/atlas/diffusion/bridges-closure.js +324 -0
- package/dist/atlas/diffusion/bridges-closure.js.map +1 -0
- package/dist/atlas/diffusion/bridges.d.ts +36 -0
- package/dist/atlas/diffusion/bridges.d.ts.map +1 -0
- package/dist/atlas/diffusion/bridges.js +226 -0
- package/dist/atlas/diffusion/bridges.js.map +1 -0
- package/dist/atlas/diffusion/dimensions.d.ts +21 -0
- package/dist/atlas/diffusion/dimensions.d.ts.map +1 -0
- package/dist/atlas/diffusion/dimensions.js +21 -0
- package/dist/atlas/diffusion/dimensions.js.map +1 -0
- package/dist/atlas/diffusion/index.d.ts +16 -0
- package/dist/atlas/diffusion/index.d.ts.map +1 -0
- package/dist/atlas/diffusion/index.js +23 -0
- package/dist/atlas/diffusion/index.js.map +1 -0
- package/dist/atlas/diffusion/models.d.ts +24 -0
- package/dist/atlas/diffusion/models.d.ts.map +1 -0
- package/dist/atlas/diffusion/models.js +139 -0
- package/dist/atlas/diffusion/models.js.map +1 -0
- package/dist/atlas/diffusion/numerics.d.ts +181 -0
- package/dist/atlas/diffusion/numerics.d.ts.map +1 -0
- package/dist/atlas/diffusion/numerics.js +251 -0
- package/dist/atlas/diffusion/numerics.js.map +1 -0
- package/dist/atlas/error-algebra.d.ts +52 -0
- package/dist/atlas/error-algebra.d.ts.map +1 -0
- package/dist/atlas/error-algebra.js +55 -0
- package/dist/atlas/error-algebra.js.map +1 -0
- package/dist/atlas/export.d.ts +48 -0
- package/dist/atlas/export.d.ts.map +1 -0
- package/dist/atlas/export.js +106 -0
- package/dist/atlas/export.js.map +1 -0
- package/dist/atlas/families.d.ts +14 -0
- package/dist/atlas/families.d.ts.map +1 -0
- package/dist/atlas/families.js +20 -0
- package/dist/atlas/families.js.map +1 -0
- package/dist/atlas/index.d.ts +90 -0
- package/dist/atlas/index.d.ts.map +1 -0
- package/dist/atlas/index.js +69 -0
- package/dist/atlas/index.js.map +1 -0
- package/dist/atlas/link-prediction.d.ts +71 -0
- package/dist/atlas/link-prediction.d.ts.map +1 -0
- package/dist/atlas/link-prediction.js +128 -0
- package/dist/atlas/link-prediction.js.map +1 -0
- package/dist/atlas/model.d.ts +70 -0
- package/dist/atlas/model.d.ts.map +1 -0
- package/dist/atlas/model.js +26 -0
- package/dist/atlas/model.js.map +1 -0
- package/dist/atlas/oscillators/bridges-coarse.d.ts +71 -0
- package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -0
- package/dist/atlas/oscillators/bridges-coarse.js +146 -0
- package/dist/atlas/oscillators/bridges-coarse.js.map +1 -0
- package/dist/atlas/oscillators/bridges-exact.d.ts +70 -0
- package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -0
- package/dist/atlas/oscillators/bridges-exact.js +227 -0
- package/dist/atlas/oscillators/bridges-exact.js.map +1 -0
- package/dist/atlas/oscillators/bridges-limits.d.ts +118 -0
- package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -0
- package/dist/atlas/oscillators/bridges-limits.js +342 -0
- package/dist/atlas/oscillators/bridges-limits.js.map +1 -0
- package/dist/atlas/oscillators/dimensions.d.ts +34 -0
- package/dist/atlas/oscillators/dimensions.d.ts.map +1 -0
- package/dist/atlas/oscillators/dimensions.js +34 -0
- package/dist/atlas/oscillators/dimensions.js.map +1 -0
- package/dist/atlas/oscillators/index.d.ts +38 -0
- package/dist/atlas/oscillators/index.d.ts.map +1 -0
- package/dist/atlas/oscillators/index.js +37 -0
- package/dist/atlas/oscillators/index.js.map +1 -0
- package/dist/atlas/oscillators/models.d.ts +25 -0
- package/dist/atlas/oscillators/models.d.ts.map +1 -0
- package/dist/atlas/oscillators/models.js +160 -0
- package/dist/atlas/oscillators/models.js.map +1 -0
- package/dist/atlas/oscillators/rejections.d.ts +21 -0
- package/dist/atlas/oscillators/rejections.d.ts.map +1 -0
- package/dist/atlas/oscillators/rejections.js +54 -0
- package/dist/atlas/oscillators/rejections.js.map +1 -0
- package/dist/atlas/path-bound.d.ts +143 -0
- package/dist/atlas/path-bound.d.ts.map +1 -0
- package/dist/atlas/path-bound.js +268 -0
- package/dist/atlas/path-bound.js.map +1 -0
- package/dist/atlas/poster/associations.d.ts +66 -0
- package/dist/atlas/poster/associations.d.ts.map +1 -0
- package/dist/atlas/poster/associations.js +90 -0
- package/dist/atlas/poster/associations.js.map +1 -0
- package/dist/atlas/poster/derivations.d.ts +156 -0
- package/dist/atlas/poster/derivations.d.ts.map +1 -0
- package/dist/atlas/poster/derivations.js +430 -0
- package/dist/atlas/poster/derivations.js.map +1 -0
- package/dist/atlas/poster/statements.d.ts +198 -0
- package/dist/atlas/poster/statements.d.ts.map +1 -0
- package/dist/atlas/poster/statements.js +365 -0
- package/dist/atlas/poster/statements.js.map +1 -0
- package/dist/atlas/public.d.ts +26 -0
- package/dist/atlas/public.d.ts.map +1 -0
- package/dist/atlas/public.js +21 -0
- package/dist/atlas/public.js.map +1 -0
- package/dist/atlas/regime.d.ts +171 -0
- package/dist/atlas/regime.d.ts.map +1 -0
- package/dist/atlas/regime.js +309 -0
- package/dist/atlas/regime.js.map +1 -0
- package/dist/atlas/serialize.d.ts +50 -0
- package/dist/atlas/serialize.d.ts.map +1 -0
- package/dist/atlas/serialize.js +180 -0
- package/dist/atlas/serialize.js.map +1 -0
- package/dist/atlas/statement.d.ts +165 -0
- package/dist/atlas/statement.d.ts.map +1 -0
- package/dist/atlas/statement.js +176 -0
- package/dist/atlas/statement.js.map +1 -0
- package/dist/atlas/types.d.ts +308 -0
- package/dist/atlas/types.d.ts.map +1 -0
- package/dist/atlas/types.js +61 -0
- package/dist/atlas/types.js.map +1 -0
- package/dist/atlas/waves/bridges-closure.d.ts +39 -0
- package/dist/atlas/waves/bridges-closure.d.ts.map +1 -0
- package/dist/atlas/waves/bridges-closure.js +223 -0
- package/dist/atlas/waves/bridges-closure.js.map +1 -0
- package/dist/atlas/waves/bridges.d.ts +49 -0
- package/dist/atlas/waves/bridges.d.ts.map +1 -0
- package/dist/atlas/waves/bridges.js +265 -0
- package/dist/atlas/waves/bridges.js.map +1 -0
- package/dist/atlas/waves/index.d.ts +16 -0
- package/dist/atlas/waves/index.d.ts.map +1 -0
- package/dist/atlas/waves/index.js +23 -0
- package/dist/atlas/waves/index.js.map +1 -0
- package/dist/atlas/waves/models.d.ts +29 -0
- package/dist/atlas/waves/models.d.ts.map +1 -0
- package/dist/atlas/waves/models.js +127 -0
- package/dist/atlas/waves/models.js.map +1 -0
- package/dist/atlas/waves/numerics.d.ts +149 -0
- package/dist/atlas/waves/numerics.d.ts.map +1 -0
- package/dist/atlas/waves/numerics.js +218 -0
- package/dist/atlas/waves/numerics.js.map +1 -0
- package/dist/atlas/witness-artifact.d.ts +65 -0
- package/dist/atlas/witness-artifact.d.ts.map +1 -0
- package/dist/atlas/witness-artifact.js +78 -0
- package/dist/atlas/witness-artifact.js.map +1 -0
- package/dist/atlas/witness-numeric.d.ts +81 -0
- package/dist/atlas/witness-numeric.d.ts.map +1 -0
- package/dist/atlas/witness-numeric.js +105 -0
- package/dist/atlas/witness-numeric.js.map +1 -0
- package/dist/atlas/witness-result.d.ts +77 -0
- package/dist/atlas/witness-result.d.ts.map +1 -0
- package/dist/atlas/witness-result.js +39 -0
- package/dist/atlas/witness-result.js.map +1 -0
- package/dist/atlas/witness-specs.d.ts +110 -0
- package/dist/atlas/witness-specs.d.ts.map +1 -0
- package/dist/atlas/witness-specs.js +372 -0
- package/dist/atlas/witness-specs.js.map +1 -0
- package/dist/atlas/witness-symbolic.d.ts +79 -0
- package/dist/atlas/witness-symbolic.d.ts.map +1 -0
- package/dist/atlas/witness-symbolic.js +140 -0
- package/dist/atlas/witness-symbolic.js.map +1 -0
- package/dist/atlas/witnesses/quantum-support.d.ts +50 -0
- package/dist/atlas/witnesses/quantum-support.d.ts.map +1 -0
- package/dist/atlas/witnesses/quantum-support.js +48 -0
- package/dist/atlas/witnesses/quantum-support.js.map +1 -0
- package/dist/bridges/be11-decoherence-confrontation.js.map +1 -1
- package/dist/bridges/be21-kss-confrontation.js.map +1 -1
- package/dist/bridges/be23-planckian-confrontation.js.map +1 -1
- package/dist/bridges/be35-bootstrap-confrontation.js.map +1 -1
- package/dist/bridges/be36-gw170817-confrontation.js.map +1 -1
- package/dist/bridges/be37-cassini-confrontation.js.map +1 -1
- package/dist/bridges/be48-collapse-confrontation.js.map +1 -1
- package/dist/bridges/be51-lensing-confrontation.js.map +1 -1
- package/dist/bridges/be52-mercury-confrontation.js.map +1 -1
- package/dist/bridges/be55-quantum-hall-confrontation.js.map +1 -1
- package/dist/bridges/be56-casimir-confrontation.js.map +1 -1
- package/dist/bridges/be58-johnson-nyquist-confrontation.js.map +1 -1
- package/dist/bridges/be59-ac-josephson-confrontation.js.map +1 -1
- package/dist/bridges/be60-fractional-qh-confrontation.js.map +1 -1
- package/dist/bridges/be61-wiedemann-franz-confrontation.js.map +1 -1
- package/dist/bridges/be62-bcs-gap-confrontation.js.map +1 -1
- package/dist/bridges/be63-chandrasekhar-mass-confrontation.js.map +1 -1
- package/dist/bridges/be64-eddington-luminosity-confrontation.js.map +1 -1
- package/dist/bridges/be65-jeans-mass-confrontation.js.map +1 -1
- package/dist/bridges/bridge-equations.d.ts +2 -1
- package/dist/bridges/bridge-equations.d.ts.map +1 -1
- package/dist/bridges/bridge-equations.js +3 -2
- package/dist/bridges/bridge-equations.js.map +1 -1
- package/dist/bridges/catalog-adapter.d.ts.map +1 -1
- package/dist/bridges/catalog-adapter.js.map +1 -1
- package/dist/bridges/equations/_be-helpers.d.ts +2 -2
- package/dist/bridges/equations/_be-helpers.js +2 -2
- package/dist/bridges/equations/be-20-vacuum-energy.js.map +1 -1
- package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts +88 -58
- package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts.map +1 -1
- package/dist/bridges/equations/be-35-conformal-bootstrap.js +102 -62
- package/dist/bridges/equations/be-35-conformal-bootstrap.js.map +1 -1
- package/dist/bridges/equations/be-48-grw-localization.d.ts +9 -8
- package/dist/bridges/equations/be-48-grw-localization.d.ts.map +1 -1
- package/dist/bridges/equations/be-48-grw-localization.js +9 -8
- package/dist/bridges/equations/be-48-grw-localization.js.map +1 -1
- package/dist/bridges/gravitational-lensing.d.ts +10 -0
- package/dist/bridges/gravitational-lensing.d.ts.map +1 -1
- package/dist/bridges/gravitational-lensing.js.map +1 -1
- package/dist/bridges/index.d.ts +125 -7
- package/dist/bridges/index.d.ts.map +1 -1
- package/dist/bridges/index.js +483 -20
- package/dist/bridges/index.js.map +1 -1
- package/dist/bridges/perihelion-precession.d.ts +10 -0
- package/dist/bridges/perihelion-precession.d.ts.map +1 -1
- package/dist/bridges/perihelion-precession.js.map +1 -1
- package/dist/bridges/rhs-registry.js +2 -2
- package/dist/canonical/canonical-equation.d.ts +15 -0
- package/dist/canonical/canonical-equation.d.ts.map +1 -1
- package/dist/canonical/entries/_l1-build.d.ts +1 -1
- package/dist/canonical/entries/_l1-build.d.ts.map +1 -1
- package/dist/canonical/entries/atomic.d.ts.map +1 -1
- package/dist/canonical/entries/atomic.js +23 -0
- package/dist/canonical/entries/atomic.js.map +1 -1
- package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
- package/dist/canonical/entries/nonmonomial.js +93 -0
- package/dist/canonical/entries/nonmonomial.js.map +1 -1
- package/dist/canonical/normal-form.js.map +1 -1
- package/dist/canonical/residual.d.ts +28 -0
- package/dist/canonical/residual.d.ts.map +1 -0
- package/dist/canonical/residual.js +31 -0
- package/dist/canonical/residual.js.map +1 -0
- package/dist/cli/command.d.ts +8 -0
- package/dist/cli/command.d.ts.map +1 -1
- package/dist/cli/command.js +10 -0
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/commands/atlas.d.ts +3 -0
- package/dist/cli/commands/atlas.d.ts.map +1 -0
- package/dist/cli/commands/atlas.js +158 -0
- package/dist/cli/commands/atlas.js.map +1 -0
- package/dist/cli/commands/confront.js.map +1 -1
- package/dist/cli/commands/coverage.js +3 -3
- package/dist/cli/commands/index.d.ts +3 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +3 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/map.d.ts.map +1 -1
- package/dist/cli/commands/map.js +161 -27
- package/dist/cli/commands/map.js.map +1 -1
- package/dist/cli/commands/path.d.ts +3 -0
- package/dist/cli/commands/path.d.ts.map +1 -0
- package/dist/cli/commands/path.js +145 -0
- package/dist/cli/commands/path.js.map +1 -0
- package/dist/cli/commands/recover.d.ts.map +1 -1
- package/dist/cli/commands/recover.js +25 -6
- package/dist/cli/commands/recover.js.map +1 -1
- package/dist/cli/commands/regime.d.ts +14 -0
- package/dist/cli/commands/regime.d.ts.map +1 -0
- package/dist/cli/commands/regime.js +189 -0
- package/dist/cli/commands/regime.js.map +1 -0
- package/dist/cli/errors.d.ts.map +1 -1
- package/dist/cli/graphs.d.ts.map +1 -1
- package/dist/cli/graphs.js +5 -1
- package/dist/cli/graphs.js.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +22 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/output.d.ts +6 -1
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/version.js.map +1 -1
- package/dist/cli-api.d.ts +16 -0
- package/dist/cli-api.d.ts.map +1 -1
- package/dist/cli-api.js +18 -0
- package/dist/cli-api.js.map +1 -1
- package/dist/composition/axis-audit.js.map +1 -1
- package/dist/composition/bridge-prediction.d.ts.map +1 -1
- package/dist/composition/bridge-prediction.js +0 -0
- package/dist/composition/bridge-prediction.js.map +1 -1
- package/dist/composition/canonical-graph.d.ts +2 -2
- package/dist/composition/canonical-graph.js +2 -2
- package/dist/composition/canonical-graph.js.map +1 -1
- package/dist/composition/compose-symbolic.d.ts.map +1 -1
- package/dist/composition/compose-symbolic.js.map +1 -1
- package/dist/composition/compose.d.ts.map +1 -1
- package/dist/composition/compose.js +80 -1
- package/dist/composition/compose.js.map +1 -1
- package/dist/composition/consequence.js.map +1 -1
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edge.d.ts +64 -0
- package/dist/composition/edge.d.ts.map +1 -1
- package/dist/composition/edge.js +29 -0
- package/dist/composition/edge.js.map +1 -1
- package/dist/composition/edges/calibration.d.ts.map +1 -1
- package/dist/composition/edges/calibration.js +46 -0
- package/dist/composition/edges/calibration.js.map +1 -1
- package/dist/composition/edges/catalog-quantum.d.ts.map +1 -1
- package/dist/composition/edges/catalog-quantum.js +9 -0
- package/dist/composition/edges/catalog-quantum.js.map +1 -1
- package/dist/composition/edges/catalog-tranche.d.ts.map +1 -1
- package/dist/composition/edges/catalog-tranche.js +18 -0
- package/dist/composition/edges/catalog-tranche.js.map +1 -1
- package/dist/composition/enumerate.js.map +1 -1
- package/dist/composition/explain.js.map +1 -1
- package/dist/composition/expr-eval.d.ts.map +1 -1
- package/dist/composition/expr-eval.js.map +1 -1
- package/dist/composition/expr-simplify.d.ts +13 -0
- package/dist/composition/expr-simplify.d.ts.map +1 -1
- package/dist/composition/expr-simplify.js +25 -0
- package/dist/composition/expr-simplify.js.map +1 -1
- package/dist/composition/expr-subst.js.map +1 -1
- package/dist/composition/graph-viz-svg.d.ts.map +1 -1
- package/dist/composition/graph-viz.d.ts +118 -1
- package/dist/composition/graph-viz.d.ts.map +1 -1
- package/dist/composition/graph-viz.js +189 -6
- package/dist/composition/graph-viz.js.map +1 -1
- package/dist/composition/identifiability.js.map +1 -1
- package/dist/composition/index.d.ts +4 -2
- package/dist/composition/index.d.ts.map +1 -1
- package/dist/composition/index.js +2 -1
- package/dist/composition/index.js.map +1 -1
- package/dist/composition/poster-source.d.ts +153 -0
- package/dist/composition/poster-source.d.ts.map +1 -0
- package/dist/composition/poster-source.js +183 -0
- package/dist/composition/poster-source.js.map +1 -0
- package/dist/composition/probe/backend-protocol.d.ts +34 -1
- package/dist/composition/probe/backend-protocol.d.ts.map +1 -1
- package/dist/composition/probe/backend-protocol.js +9 -2
- package/dist/composition/probe/backend-protocol.js.map +1 -1
- package/dist/composition/probe/candidate-store.d.ts.map +1 -1
- package/dist/composition/probe/limits.js.map +1 -1
- package/dist/composition/probe/pipeline.js.map +1 -1
- package/dist/composition/probe/problem.js.map +1 -1
- package/dist/composition/probe/residual.d.ts.map +1 -1
- package/dist/composition/probe/residual.js.map +1 -1
- package/dist/composition/probe/search-budget.js.map +1 -1
- package/dist/composition/proposed-bridges.d.ts +2 -2
- package/dist/composition/proposed-bridges.d.ts.map +1 -1
- package/dist/composition/proposed-bridges.js +1 -1
- package/dist/composition/proposed-bridges.js.map +1 -1
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/uncertainty.d.ts +52 -2
- package/dist/composition/uncertainty.d.ts.map +1 -1
- package/dist/composition/uncertainty.js +38 -2
- package/dist/composition/uncertainty.js.map +1 -1
- package/dist/composition/user-equation.d.ts.map +1 -1
- package/dist/core/flux-rules.d.ts.map +1 -1
- package/dist/core/flux-rules.js.map +1 -1
- package/dist/core/labeled-tensor.d.ts.map +1 -1
- package/dist/core/regime-registry.d.ts.map +1 -1
- package/dist/core/regime-rule-install.js.map +1 -1
- package/dist/core/tensor.d.ts.map +1 -1
- package/dist/core/tensor.js.map +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/diff/bridge-ast-gradient.js.map +1 -1
- package/dist/dimensional/ast-types.d.ts +31 -1
- package/dist/dimensional/ast-types.d.ts.map +1 -1
- package/dist/dimensional/bridge-check.d.ts +1 -1
- package/dist/dimensional/bridge-check.js +1 -1
- package/dist/dimensional/buckingham.d.ts.map +1 -1
- package/dist/dimensional/connection.d.ts +2 -0
- package/dist/dimensional/connection.d.ts.map +1 -1
- package/dist/dimensional/connection.js +2 -0
- package/dist/dimensional/connection.js.map +1 -1
- package/dist/dimensional/curvature-composite.d.ts +5 -3
- package/dist/dimensional/curvature-composite.d.ts.map +1 -1
- package/dist/dimensional/curvature-composite.js +1 -0
- package/dist/dimensional/curvature-composite.js.map +1 -1
- package/dist/dimensional/curvature-invariants.d.ts +2 -0
- package/dist/dimensional/curvature-invariants.d.ts.map +1 -1
- package/dist/dimensional/curvature-invariants.js +2 -0
- package/dist/dimensional/curvature-invariants.js.map +1 -1
- package/dist/dimensional/dimension-spec.d.ts.map +1 -1
- package/dist/dimensional/einstein-equation.d.ts +3 -3
- package/dist/dimensional/einstein-equation.js +3 -3
- package/dist/dimensional/errors.d.ts.map +1 -1
- package/dist/dimensional/metric.d.ts +5 -2
- package/dist/dimensional/metric.d.ts.map +1 -1
- package/dist/dimensional/metric.js +5 -2
- package/dist/dimensional/metric.js.map +1 -1
- package/dist/dimensional/tensor-trace.js.map +1 -1
- package/dist/dimensional/validator-registry.js.map +1 -1
- package/dist/dimensional/validator.d.ts +3 -2
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.js +23 -4
- package/dist/dimensional/validator.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +104 -0
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/errors.d.ts.map +1 -1
- package/dist/numerical/errors.js.map +1 -1
- package/dist/numerical/float64-engine.d.ts.map +1 -1
- package/dist/numerical/float64-engine.js +51 -24
- package/dist/numerical/float64-engine.js.map +1 -1
- package/dist/numerical/formula-dimension.d.ts.map +1 -1
- package/dist/numerical/formula-dimension.js.map +1 -1
- package/dist/numerical/formula.d.ts.map +1 -1
- package/dist/numerical/formula.js.map +1 -1
- package/dist/numerical/geometrized.d.ts.map +1 -1
- package/dist/numerical/gl4-integrator.d.ts +3 -3
- package/dist/numerical/gl4-integrator.js +3 -3
- package/dist/numerical/killing.d.ts +47 -5
- package/dist/numerical/killing.d.ts.map +1 -1
- package/dist/numerical/killing.js +41 -3
- package/dist/numerical/killing.js.map +1 -1
- package/dist/numerical/klein-gordon.d.ts +2 -2
- package/dist/numerical/klein-gordon.js +2 -2
- package/dist/numerical/lowering.d.ts +2 -2
- package/dist/numerical/lowering.d.ts.map +1 -1
- package/dist/numerical/lowering.js +5 -3
- package/dist/numerical/lowering.js.map +1 -1
- package/dist/numerical/mathts-engine.d.ts.map +1 -1
- package/dist/numerical/mathts-engine.js.map +1 -1
- package/dist/numerical/metric-inverse.js.map +1 -1
- package/dist/numerical/perihelion-finder.d.ts +15 -13
- package/dist/numerical/perihelion-finder.d.ts.map +1 -1
- package/dist/numerical/perihelion-finder.js +15 -13
- package/dist/numerical/perihelion-finder.js.map +1 -1
- package/dist/numerical/weyl-lowering.d.ts.map +1 -1
- package/dist/numerical/weyl-lowering.js +90 -40
- package/dist/numerical/weyl-lowering.js.map +1 -1
- package/package.json +121 -104
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas Phase 5, S5.4 — the benchmark's statistics and power report.
|
|
3
|
+
*
|
|
4
|
+
* Design note: `docs/planning/Atlas-Phase-5-Design.md` §8.
|
|
5
|
+
*
|
|
6
|
+
* Every function here is tested against a value computed independently, not
|
|
7
|
+
* against its own output: the Wilson intervals against the plan's textbook
|
|
8
|
+
* values, McNemar against a hand-computed 2×2 table, and κ against a hand-computed
|
|
9
|
+
* confusion matrix. The paired-difference interval (Newcombe's method 10) has no
|
|
10
|
+
* textbook value in the repository; it is tested by properties that pin it to
|
|
11
|
+
* Wilson and to the unpaired square-and-add interval where those must agree.
|
|
12
|
+
*
|
|
13
|
+
* @module atlas/benchmark/stats
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
/** The two-sided 95% normal quantile. @internal */
|
|
17
|
+
export const Z95 = 1.959963984540054;
|
|
18
|
+
/**
|
|
19
|
+
* Wilson score interval for a binomial proportion.
|
|
20
|
+
*
|
|
21
|
+
* @throws Error when `n` is not a positive integer or `successes` is outside `[0, n]`.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export function wilsonInterval(successes, n, z = Z95) {
|
|
25
|
+
if (!Number.isInteger(n) || n <= 0)
|
|
26
|
+
throw new Error(`wilsonInterval: n must be a positive integer, got ${n}`);
|
|
27
|
+
if (!Number.isInteger(successes) || successes < 0 || successes > n) {
|
|
28
|
+
throw new Error(`wilsonInterval: successes must be an integer in [0, n], got ${successes}`);
|
|
29
|
+
}
|
|
30
|
+
const p = successes / n;
|
|
31
|
+
const z2 = z * z;
|
|
32
|
+
const denom = 1 + z2 / n;
|
|
33
|
+
const centre = (p + z2 / (2 * n)) / denom;
|
|
34
|
+
const half = (z / denom) * Math.sqrt((p * (1 - p)) / n + z2 / (4 * n * n));
|
|
35
|
+
// At x = 0 the lower bound, and at x = n the upper bound, are EXACTLY 0 and 1
|
|
36
|
+
// analytically; the formula reaches them only to within float rounding.
|
|
37
|
+
return {
|
|
38
|
+
lower: successes === 0 ? 0 : Math.max(0, centre - half),
|
|
39
|
+
upper: successes === n ? 1 : Math.min(1, centre + half),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** `ln C(n, k)`, summed; exact enough for the n here. */
|
|
43
|
+
function logChoose(n, k) {
|
|
44
|
+
let s = 0;
|
|
45
|
+
for (let i = 1; i <= k; i++)
|
|
46
|
+
s += Math.log(n - k + i) - Math.log(i);
|
|
47
|
+
return s;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* McNemar's paired test. The EXACT binomial p-value is the one to report at
|
|
51
|
+
* these sample sizes; the χ² is given because readers expect it.
|
|
52
|
+
*
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
export function mcnemar(table) {
|
|
56
|
+
const n = table.b + table.c;
|
|
57
|
+
if (n === 0)
|
|
58
|
+
return { chiSquared: 0, exactP: 1 };
|
|
59
|
+
const chiSquared = (Math.abs(table.b - table.c) - 1) ** 2 / n;
|
|
60
|
+
const k = Math.min(table.b, table.c);
|
|
61
|
+
let tail = 0;
|
|
62
|
+
for (let i = 0; i <= k; i++)
|
|
63
|
+
tail += Math.exp(logChoose(n, i) - n * Math.LN2);
|
|
64
|
+
return { chiSquared, exactP: Math.min(1, 2 * tail) };
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Newcombe's method 10: a 95% interval for the PAIRED difference in proportions
|
|
68
|
+
* p_A − p_B = (b − c)/n, built from the two marginal Wilson intervals and a
|
|
69
|
+
* correlation correction φ. Pre-registered criterion: the interval for the
|
|
70
|
+
* atlas-minus-baseline difference must exclude zero.
|
|
71
|
+
*
|
|
72
|
+
* Newcombe, Statistics in Medicine 17 (1998) 2635.
|
|
73
|
+
*
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
export function pairedDifferenceInterval(table, z = Z95) {
|
|
77
|
+
const { a, b, c, d } = table;
|
|
78
|
+
const n = a + b + c + d;
|
|
79
|
+
if (n === 0)
|
|
80
|
+
throw new Error('pairedDifferenceInterval: empty table');
|
|
81
|
+
const p1 = (a + b) / n;
|
|
82
|
+
const p2 = (a + c) / n;
|
|
83
|
+
const w1 = wilsonInterval(a + b, n, z);
|
|
84
|
+
const w2 = wilsonInterval(a + c, n, z);
|
|
85
|
+
const denom = Math.sqrt((a + b) * (c + d) * (a + c) * (b + d));
|
|
86
|
+
let phi = 0;
|
|
87
|
+
if (denom > 0) {
|
|
88
|
+
const cross = a * d - b * c;
|
|
89
|
+
// Newcombe's continuity adjustment of φ, applied only when ad > bc.
|
|
90
|
+
phi = (cross > 0 ? Math.max(cross - n / 2, 0) : cross) / denom;
|
|
91
|
+
}
|
|
92
|
+
const diff = p1 - p2;
|
|
93
|
+
const dl1 = p1 - w1.lower;
|
|
94
|
+
const du1 = w1.upper - p1;
|
|
95
|
+
const dl2 = p2 - w2.lower;
|
|
96
|
+
const du2 = w2.upper - p2;
|
|
97
|
+
const lower = diff - Math.sqrt(Math.max(0, dl1 * dl1 - 2 * phi * dl1 * du2 + du2 * du2));
|
|
98
|
+
const upper = diff + Math.sqrt(Math.max(0, du1 * du1 - 2 * phi * du1 * dl2 + dl2 * dl2));
|
|
99
|
+
return { diff, lower: Math.max(-1, lower), upper: Math.min(1, upper) };
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Cohen's κ for two raters over the same items, from a square confusion matrix
|
|
103
|
+
* (`matrix[i][j]` = items rater 1 put in category i and rater 2 in category j).
|
|
104
|
+
*
|
|
105
|
+
* @returns NaN when chance agreement is 1 (κ is undefined there), never 1.
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
export function cohensKappa(matrix) {
|
|
109
|
+
const k = matrix.length;
|
|
110
|
+
if (k === 0 || matrix.some((row) => row.length !== k))
|
|
111
|
+
throw new Error('cohensKappa: matrix must be square and non-empty');
|
|
112
|
+
let n = 0;
|
|
113
|
+
let agree = 0;
|
|
114
|
+
const rows = new Array(k).fill(0);
|
|
115
|
+
const cols = new Array(k).fill(0);
|
|
116
|
+
for (let i = 0; i < k; i++) {
|
|
117
|
+
for (let j = 0; j < k; j++) {
|
|
118
|
+
const v = matrix[i][j];
|
|
119
|
+
n += v;
|
|
120
|
+
rows[i] += v;
|
|
121
|
+
cols[j] += v;
|
|
122
|
+
if (i === j)
|
|
123
|
+
agree += v;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (n === 0)
|
|
127
|
+
throw new Error('cohensKappa: no ratings');
|
|
128
|
+
const po = agree / n;
|
|
129
|
+
let pe = 0;
|
|
130
|
+
for (let i = 0; i < k; i++)
|
|
131
|
+
pe += (rows[i] / n) * (cols[i] / n);
|
|
132
|
+
if (pe === 1)
|
|
133
|
+
return Number.NaN;
|
|
134
|
+
return (po - pe) / (1 - pe);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The interval a frozen set of `nPerClass` items per class can afford at an
|
|
138
|
+
* assumed accuracy. This is the "report the interval it can afford rather than
|
|
139
|
+
* the claim it cannot" line of ROADMAP Phase 5.
|
|
140
|
+
*
|
|
141
|
+
* @internal
|
|
142
|
+
*/
|
|
143
|
+
export function powerReport(nPerClass, assumedAccuracy = 0.8) {
|
|
144
|
+
const successes = Math.round(assumedAccuracy * nPerClass);
|
|
145
|
+
const interval = wilsonInterval(successes, nPerClass);
|
|
146
|
+
const halfWidth = (interval.upper - interval.lower) / 2;
|
|
147
|
+
const pct = (x) => `${(100 * x).toFixed(1)}%`;
|
|
148
|
+
return {
|
|
149
|
+
nPerClass,
|
|
150
|
+
assumedAccuracy,
|
|
151
|
+
interval,
|
|
152
|
+
halfWidth,
|
|
153
|
+
statement: `With ${nPerClass} items per class at ${pct(assumedAccuracy)} accuracy, the 95% Wilson interval ` +
|
|
154
|
+
`is [${pct(interval.lower)}, ${pct(interval.upper)}] (±${pct(halfWidth)}). Two methods whose ` +
|
|
155
|
+
`accuracies differ by less than about ${pct(2 * halfWidth)} cannot be separated on this set ` +
|
|
156
|
+
'by unpaired intervals; the paired McNemar design is what narrows it.',
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=stats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../src/atlas/benchmark/stats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,mDAAmD;AACnD,MAAM,CAAC,MAAM,GAAG,GAAG,iBAAiB,CAAC;AAQrC;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB,EAAE,CAAS,EAAE,CAAC,GAAG,GAAG;IAClE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,EAAE,CAAC,CAAC;IAC9G,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,KAAK,CAAC,+DAA+D,SAAS,EAAE,CAAC,CAAC;IAC9F,CAAC;IACD,MAAM,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;IACxB,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzB,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC1C,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,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|
+
*
|
|
4
|
+
* Design note: `docs/planning/Atlas-Phase-5-Design.md` §9.
|
|
5
|
+
*
|
|
6
|
+
* This module receives the answer key as an ARGUMENT. It never reads the scorer
|
|
7
|
+
* half of the fixture tree itself: the import guard forbids any `src/` path into
|
|
8
|
+
* it. The orchestration script (`scripts/run-atlas-study.mjs`) loads the labels
|
|
9
|
+
* and passes them in.
|
|
10
|
+
*
|
|
11
|
+
* **An empty item set produces NO metrics, not zero metrics.** `scoreCondition`
|
|
12
|
+
* throws on it: a table of zeros and NaNs from an empty set is indistinguishable,
|
|
13
|
+
* at a glance, from a condition that failed everything.
|
|
14
|
+
*
|
|
15
|
+
* @module atlas/benchmark/study
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
import type { FailureKind } from './types.js';
|
|
19
|
+
import type { Interval, McNemarResult } from './stats.js';
|
|
20
|
+
/** One condition's answer for one item. @internal */
|
|
21
|
+
export interface ConditionAnswer {
|
|
22
|
+
readonly itemId: string;
|
|
23
|
+
readonly outcome: 'accept' | 'reject' | 'abstain';
|
|
24
|
+
readonly detectedFailure?: FailureKind;
|
|
25
|
+
}
|
|
26
|
+
/** The answer key for one item — scorer-side, never in the public half. @internal */
|
|
27
|
+
export interface ItemLabel {
|
|
28
|
+
readonly itemId: string;
|
|
29
|
+
readonly kind: 'valid' | 'invalid';
|
|
30
|
+
/** For an invalid item: the failure kind a correct rejection names. */
|
|
31
|
+
readonly failureKind?: FailureKind;
|
|
32
|
+
}
|
|
33
|
+
/** One reason an answer key does not fit its item set. @internal */
|
|
34
|
+
export interface LabelProblem {
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly problem: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check an answer key against the item ids it must cover: exactly one label per
|
|
40
|
+
* item, no label for an unknown item, a known failure kind on every invalid
|
|
41
|
+
* label and none on a valid one. Takes the key as an ARGUMENT, like everything
|
|
42
|
+
* here, because no `src/` file may read the scorer half.
|
|
43
|
+
*
|
|
44
|
+
* @param itemIds - the ids of the frozen items.
|
|
45
|
+
* @param labels - the answer key.
|
|
46
|
+
* @returns every problem found, labels first in key order, then missing labels
|
|
47
|
+
* in item order; empty means the key fits.
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
export declare function validateLabels(itemIds: readonly string[], labels: readonly ItemLabel[]): LabelProblem[];
|
|
51
|
+
/** A condition's metrics on the frozen set. @internal */
|
|
52
|
+
export interface ConditionMetrics {
|
|
53
|
+
readonly condition: string;
|
|
54
|
+
readonly nValid: number;
|
|
55
|
+
readonly nInvalid: number;
|
|
56
|
+
/** Invalid items rejected, with its Wilson interval. */
|
|
57
|
+
readonly invalidRejected: number;
|
|
58
|
+
readonly invalidRejectionInterval: Interval;
|
|
59
|
+
/** Of the rejected invalid items, how many named the right failure kind. */
|
|
60
|
+
readonly kindNamedCorrectly: number;
|
|
61
|
+
/** Invalid items ACCEPTED: the error the benchmark exists to count. */
|
|
62
|
+
readonly wrongAccepts: number;
|
|
63
|
+
/** Valid items accepted. */
|
|
64
|
+
readonly validAccepted: number;
|
|
65
|
+
/** Valid items rejected. */
|
|
66
|
+
readonly falseRejects: number;
|
|
67
|
+
/** All abstentions, reported and never folded into accuracy. */
|
|
68
|
+
readonly abstentions: number;
|
|
69
|
+
/** Items the condition did not answer at all: counted, never dropped. */
|
|
70
|
+
readonly unanswered: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Score one condition against the answer key.
|
|
74
|
+
*
|
|
75
|
+
* @throws Error when the key is empty (no measurement exists), or when an answer
|
|
76
|
+
* names an item the key does not contain.
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
export declare function scoreCondition(condition: string, answers: readonly ConditionAnswer[], labels: readonly ItemLabel[]): ConditionMetrics;
|
|
80
|
+
/** The paired comparison of two conditions' rejection of invalid items. @internal */
|
|
81
|
+
export interface PairedRejection {
|
|
82
|
+
readonly conditionA: string;
|
|
83
|
+
readonly conditionB: string;
|
|
84
|
+
readonly table: {
|
|
85
|
+
readonly a: number;
|
|
86
|
+
readonly b: number;
|
|
87
|
+
readonly c: number;
|
|
88
|
+
readonly d: number;
|
|
89
|
+
};
|
|
90
|
+
readonly difference: Interval & {
|
|
91
|
+
readonly diff: number;
|
|
92
|
+
};
|
|
93
|
+
readonly mcnemar: McNemarResult;
|
|
94
|
+
/** The pre-registered criterion: the interval for A − B excludes zero, above it. */
|
|
95
|
+
readonly aBetterExcludingZero: boolean;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Compare two conditions on the SAME invalid items. An item counts as "right"
|
|
99
|
+
* for a condition when it was rejected; an unanswered item is "wrong", not dropped.
|
|
100
|
+
*
|
|
101
|
+
* @throws Error when there are no invalid items.
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
export declare function pairedRejection(conditionA: string, answersA: readonly ConditionAnswer[], conditionB: string, answersB: readonly ConditionAnswer[], labels: readonly ItemLabel[]): PairedRejection;
|
|
105
|
+
/** One row of the ablation: a configuration's metrics and its step over the previous one. @internal */
|
|
106
|
+
export interface AblationRow {
|
|
107
|
+
readonly configuration: string;
|
|
108
|
+
readonly metrics: ConditionMetrics;
|
|
109
|
+
/** Paired rejection of THIS configuration vs the previous one; absent for the first. */
|
|
110
|
+
readonly stepOverPrevious?: PairedRejection;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Score a sequence of named condition runs as an ablation: each row is scored,
|
|
114
|
+
* and each row after the first is compared, paired on the same invalid items,
|
|
115
|
+
* against the row before it — so the table shows what each added layer bought.
|
|
116
|
+
*
|
|
117
|
+
* @internal
|
|
118
|
+
*/
|
|
119
|
+
export declare function scoreAblation(runs: ReadonlyArray<readonly [string, readonly ConditionAnswer[]]>, labels: readonly ItemLabel[]): AblationRow[];
|
|
120
|
+
//# sourceMappingURL=study.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"study.d.ts","sourceRoot":"","s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GAAuG;AACvG,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,wFAAwF;IACxF,QAAQ,CAAC,gBAAgB,CAAC,EAAE,eAAe,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC,CAAC,EAClE,MAAM,EAAE,SAAS,SAAS,EAAE,GAC3B,WAAW,EAAE,CAgBf"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas Phase 6, S6.1 — scoring a benchmark condition against the answer key.
|
|
3
|
+
*
|
|
4
|
+
* Design note: `docs/planning/Atlas-Phase-5-Design.md` §9.
|
|
5
|
+
*
|
|
6
|
+
* This module receives the answer key as an ARGUMENT. It never reads the scorer
|
|
7
|
+
* half of the fixture tree itself: the import guard forbids any `src/` path into
|
|
8
|
+
* it. The orchestration script (`scripts/run-atlas-study.mjs`) loads the labels
|
|
9
|
+
* and passes them in.
|
|
10
|
+
*
|
|
11
|
+
* **An empty item set produces NO metrics, not zero metrics.** `scoreCondition`
|
|
12
|
+
* throws on it: a table of zeros and NaNs from an empty set is indistinguishable,
|
|
13
|
+
* at a glance, from a condition that failed everything.
|
|
14
|
+
*
|
|
15
|
+
* @module atlas/benchmark/study
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
import { FAILURE_KINDS } from './types.js';
|
|
19
|
+
import { mcnemar, pairedDifferenceInterval, wilsonInterval } from './stats.js';
|
|
20
|
+
const KNOWN_FAILURES = new Set(FAILURE_KINDS);
|
|
21
|
+
/**
|
|
22
|
+
* Check an answer key against the item ids it must cover: exactly one label per
|
|
23
|
+
* item, no label for an unknown item, a known failure kind on every invalid
|
|
24
|
+
* label and none on a valid one. Takes the key as an ARGUMENT, like everything
|
|
25
|
+
* here, because no `src/` file may read the scorer half.
|
|
26
|
+
*
|
|
27
|
+
* @param itemIds - the ids of the frozen items.
|
|
28
|
+
* @param labels - the answer key.
|
|
29
|
+
* @returns every problem found, labels first in key order, then missing labels
|
|
30
|
+
* in item order; empty means the key fits.
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export function validateLabels(itemIds, labels) {
|
|
34
|
+
const problems = [];
|
|
35
|
+
const ids = new Set(itemIds);
|
|
36
|
+
const seen = new Set();
|
|
37
|
+
for (const l of labels) {
|
|
38
|
+
const p = (problem) => {
|
|
39
|
+
problems.push({ id: l.itemId, problem });
|
|
40
|
+
};
|
|
41
|
+
if (seen.has(l.itemId))
|
|
42
|
+
p('duplicate label');
|
|
43
|
+
seen.add(l.itemId);
|
|
44
|
+
if (!ids.has(l.itemId))
|
|
45
|
+
p('label for an item not in the set');
|
|
46
|
+
if (l.kind === 'invalid') {
|
|
47
|
+
if (l.failureKind === undefined)
|
|
48
|
+
p('an invalid label must name its failureKind');
|
|
49
|
+
else if (!KNOWN_FAILURES.has(l.failureKind))
|
|
50
|
+
p(`unknown failureKind '${l.failureKind}'`);
|
|
51
|
+
}
|
|
52
|
+
else if (l.failureKind !== undefined) {
|
|
53
|
+
p('a valid label must not carry a failureKind');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
for (const id of itemIds)
|
|
57
|
+
if (!seen.has(id))
|
|
58
|
+
problems.push({ id, problem: 'no label' });
|
|
59
|
+
return problems;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Score one condition against the answer key.
|
|
63
|
+
*
|
|
64
|
+
* @throws Error when the key is empty (no measurement exists), or when an answer
|
|
65
|
+
* names an item the key does not contain.
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
export function scoreCondition(condition, answers, labels) {
|
|
69
|
+
if (labels.length === 0) {
|
|
70
|
+
throw new Error(`scoreCondition(${condition}): the answer key is empty — there is nothing to measure`);
|
|
71
|
+
}
|
|
72
|
+
const byId = new Map(answers.map((a) => [a.itemId, a]));
|
|
73
|
+
const labelIds = new Set(labels.map((l) => l.itemId));
|
|
74
|
+
for (const a of answers) {
|
|
75
|
+
if (!labelIds.has(a.itemId))
|
|
76
|
+
throw new Error(`scoreCondition(${condition}): answer for unknown item ${a.itemId}`);
|
|
77
|
+
}
|
|
78
|
+
let nValid = 0;
|
|
79
|
+
let nInvalid = 0;
|
|
80
|
+
let invalidRejected = 0;
|
|
81
|
+
let kindNamedCorrectly = 0;
|
|
82
|
+
let wrongAccepts = 0;
|
|
83
|
+
let validAccepted = 0;
|
|
84
|
+
let falseRejects = 0;
|
|
85
|
+
let abstentions = 0;
|
|
86
|
+
let unanswered = 0;
|
|
87
|
+
for (const label of labels) {
|
|
88
|
+
const answer = byId.get(label.itemId);
|
|
89
|
+
if (answer === undefined)
|
|
90
|
+
unanswered++;
|
|
91
|
+
else if (answer.outcome === 'abstain')
|
|
92
|
+
abstentions++;
|
|
93
|
+
if (label.kind === 'valid') {
|
|
94
|
+
nValid++;
|
|
95
|
+
if (answer?.outcome === 'accept')
|
|
96
|
+
validAccepted++;
|
|
97
|
+
if (answer?.outcome === 'reject')
|
|
98
|
+
falseRejects++;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
nInvalid++;
|
|
102
|
+
if (answer?.outcome === 'accept')
|
|
103
|
+
wrongAccepts++;
|
|
104
|
+
if (answer?.outcome === 'reject') {
|
|
105
|
+
invalidRejected++;
|
|
106
|
+
if (answer.detectedFailure !== undefined && answer.detectedFailure === label.failureKind) {
|
|
107
|
+
kindNamedCorrectly++;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
condition,
|
|
114
|
+
nValid,
|
|
115
|
+
nInvalid,
|
|
116
|
+
invalidRejected,
|
|
117
|
+
invalidRejectionInterval: nInvalid === 0 ? { lower: Number.NaN, upper: Number.NaN } : wilsonInterval(invalidRejected, nInvalid),
|
|
118
|
+
kindNamedCorrectly,
|
|
119
|
+
wrongAccepts,
|
|
120
|
+
validAccepted,
|
|
121
|
+
falseRejects,
|
|
122
|
+
abstentions,
|
|
123
|
+
unanswered,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Compare two conditions on the SAME invalid items. An item counts as "right"
|
|
128
|
+
* for a condition when it was rejected; an unanswered item is "wrong", not dropped.
|
|
129
|
+
*
|
|
130
|
+
* @throws Error when there are no invalid items.
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
133
|
+
export function pairedRejection(conditionA, answersA, conditionB, answersB, labels) {
|
|
134
|
+
const invalid = labels.filter((l) => l.kind === 'invalid');
|
|
135
|
+
if (invalid.length === 0)
|
|
136
|
+
throw new Error('pairedRejection: no invalid items to compare on');
|
|
137
|
+
const rejectedBy = (answers) => new Set(answers.filter((x) => x.outcome === 'reject').map((x) => x.itemId));
|
|
138
|
+
const ra = rejectedBy(answersA);
|
|
139
|
+
const rb = rejectedBy(answersB);
|
|
140
|
+
let a = 0;
|
|
141
|
+
let b = 0;
|
|
142
|
+
let c = 0;
|
|
143
|
+
let d = 0;
|
|
144
|
+
for (const l of invalid) {
|
|
145
|
+
const x = ra.has(l.itemId);
|
|
146
|
+
const y = rb.has(l.itemId);
|
|
147
|
+
if (x && y)
|
|
148
|
+
a++;
|
|
149
|
+
else if (x)
|
|
150
|
+
b++;
|
|
151
|
+
else if (y)
|
|
152
|
+
c++;
|
|
153
|
+
else
|
|
154
|
+
d++;
|
|
155
|
+
}
|
|
156
|
+
const table = { a, b, c, d };
|
|
157
|
+
const difference = pairedDifferenceInterval(table);
|
|
158
|
+
return {
|
|
159
|
+
conditionA,
|
|
160
|
+
conditionB,
|
|
161
|
+
table,
|
|
162
|
+
difference,
|
|
163
|
+
mcnemar: mcnemar(table),
|
|
164
|
+
aBetterExcludingZero: difference.lower > 0,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Score a sequence of named condition runs as an ablation: each row is scored,
|
|
169
|
+
* and each row after the first is compared, paired on the same invalid items,
|
|
170
|
+
* against the row before it — so the table shows what each added layer bought.
|
|
171
|
+
*
|
|
172
|
+
* @internal
|
|
173
|
+
*/
|
|
174
|
+
export function scoreAblation(runs, labels) {
|
|
175
|
+
const rows = [];
|
|
176
|
+
for (let i = 0; i < runs.length; i++) {
|
|
177
|
+
const [name, answers] = runs[i];
|
|
178
|
+
const metrics = scoreCondition(name, answers, labels);
|
|
179
|
+
if (i === 0)
|
|
180
|
+
rows.push({ configuration: name, metrics });
|
|
181
|
+
else {
|
|
182
|
+
const [prevName, prevAnswers] = runs[i - 1];
|
|
183
|
+
rows.push({
|
|
184
|
+
configuration: name,
|
|
185
|
+
metrics,
|
|
186
|
+
stepOverPrevious: pairedRejection(name, answers, prevName, prevAnswers, labels),
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return rows;
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=study.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"study.js","sourceRoot":"","sources":["../../../src/atlas/benchmark/study.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAwB/E,MAAM,cAAc,GAAG,IAAI,GAAG,CAAS,aAAa,CAAC,CAAC;AAEtD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAAC,OAA0B,EAAE,MAA4B;IACrF,MAAM,QAAQ,GAAmB,EAAE,CAAC;IACpC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,CAAC,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I,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,CAAE,CAAC;QACjC,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,KAAK,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;aACpD,CAAC;YACJ,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAE,CAAC;YAC7C,IAAI,CAAC,IAAI,CAAC;gBACR,aAAa,EAAE,IAAI;gBACnB,OAAO;gBACP,gBAAgB,EAAE,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC;aAChF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas Phase 5, S5.1 — the invalid-bridge benchmark's item schema.
|
|
3
|
+
*
|
|
4
|
+
* Design note: `docs/planning/Atlas-Phase-5-Design.md` §2.
|
|
5
|
+
*
|
|
6
|
+
* ⚠ **No agent authors a frozen item** (design note §0). This file defines the
|
|
7
|
+
* SHAPE an independent author fills in; it contains no items.
|
|
8
|
+
*
|
|
9
|
+
* @module atlas/benchmark/types
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
import type { ExprNode } from '../../dimensional/ast-types.js';
|
|
13
|
+
import type { Conventions, RegimeInequality, RelationType } from '../types.js';
|
|
14
|
+
/** The eight failure kinds, sampled evenly (ROADMAP Phase 5). @internal */
|
|
15
|
+
export declare const FAILURE_KINDS: readonly ['omitted-premise', 'domain-violation', 'convention-mismatch', 'notation-collision', 'dimensional-coincidence', 'non-uniform-limit', 'false-inverse', 'analogy-promoted'];
|
|
16
|
+
/** One failure kind. @internal */
|
|
17
|
+
export type FailureKind = (typeof FAILURE_KINDS)[number];
|
|
18
|
+
/**
|
|
19
|
+
* Who wrote an item. Only `'independent'` may be frozen; `'contested-draft'`
|
|
20
|
+
* is what an agent may produce, into `contested/`, and nothing else.
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export type Authorship = 'independent' | 'contested-draft';
|
|
25
|
+
/** Which split an item scores in. @internal */
|
|
26
|
+
export type BenchmarkSplit = 'in-distribution' | 'held-out';
|
|
27
|
+
/**
|
|
28
|
+
* The held-out family. Corrected from the plan's "first-order relaxation",
|
|
29
|
+
* which Phase 0 already encodes as `model-first-order` (design note §4).
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export declare const HELD_OUT_FAMILY = "fluid-statics";
|
|
34
|
+
/**
|
|
35
|
+
* Markers that identify the held-out family in model ids, dynamics and bridge
|
|
36
|
+
* ids. `tests/atlas/benchmark.test.ts` scans the atlas for them, and proves the
|
|
37
|
+
* scan can fire with the ORIGINAL family's markers as a positive control.
|
|
38
|
+
*
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export declare const HELD_OUT_MARKERS: readonly string[];
|
|
42
|
+
/**
|
|
43
|
+
* One benchmark item, as its PUBLIC half carries it — never the answer. Whether
|
|
44
|
+
* the item is valid, and which failure kind it has, live only in the scorer
|
|
45
|
+
* half (`ItemLabel` in `study.ts`), so a condition that reads the public file
|
|
46
|
+
* cannot read the key.
|
|
47
|
+
*
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
export interface BenchmarkItem {
|
|
51
|
+
readonly id: string;
|
|
52
|
+
readonly premises: readonly string[];
|
|
53
|
+
readonly conclusion: string;
|
|
54
|
+
readonly claimedRelation: RelationType;
|
|
55
|
+
readonly family: string;
|
|
56
|
+
readonly split: BenchmarkSplit;
|
|
57
|
+
/** The claimed relation as an AST, so the leakage check can run. */
|
|
58
|
+
readonly expr: ExprNode;
|
|
59
|
+
/** The id of the item this one renames, when it is a renamed-variable variant. */
|
|
60
|
+
readonly renamedVariant?: string;
|
|
61
|
+
readonly authorship: Authorship;
|
|
62
|
+
/** Where the item came from: an erratum, a documented misconception, a textbook. */
|
|
63
|
+
readonly source: string;
|
|
64
|
+
/** The claim's stated side conditions, as prose. `[]` states "none". */
|
|
65
|
+
readonly sideConditions?: readonly string[];
|
|
66
|
+
/** Conventions declared by the premises and by the conclusion. */
|
|
67
|
+
readonly conventions?: {
|
|
68
|
+
readonly premise?: Conventions;
|
|
69
|
+
readonly conclusion?: Conventions;
|
|
70
|
+
};
|
|
71
|
+
/** When the claim is a CHAIN: the two relations composed to reach `claimedRelation`. */
|
|
72
|
+
readonly composedFrom?: readonly [RelationType, RelationType];
|
|
73
|
+
/** The regime the claim is used in: its inequalities and the π-group values at the use site. */
|
|
74
|
+
readonly regime?: {
|
|
75
|
+
readonly inequalities: readonly RegimeInequality[];
|
|
76
|
+
readonly values: Readonly<Record<string, number>>;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atlas/benchmark/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE/E,2EAA2E;AAC3E,eAAO,MAAM,aAAa,YACxB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,CACV,CAAC;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AAY,CAAC,CAAC;IAC9D,gGAAgG;IAChG,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB,QAAQ,CAAC,YAAY,EAAE,SAAS,gBAAgB,EAAE,CAAC;QACnD,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;KACnD,CAAC;CACH"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas Phase 5, S5.1 — the invalid-bridge benchmark's item schema.
|
|
3
|
+
*
|
|
4
|
+
* Design note: `docs/planning/Atlas-Phase-5-Design.md` §2.
|
|
5
|
+
*
|
|
6
|
+
* ⚠ **No agent authors a frozen item** (design note §0). This file defines the
|
|
7
|
+
* SHAPE an independent author fills in; it contains no items.
|
|
8
|
+
*
|
|
9
|
+
* @module atlas/benchmark/types
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
/** The eight failure kinds, sampled evenly (ROADMAP Phase 5). @internal */
|
|
13
|
+
export const FAILURE_KINDS = [
|
|
14
|
+
'omitted-premise',
|
|
15
|
+
'domain-violation',
|
|
16
|
+
'convention-mismatch',
|
|
17
|
+
'notation-collision',
|
|
18
|
+
'dimensional-coincidence',
|
|
19
|
+
'non-uniform-limit',
|
|
20
|
+
'false-inverse',
|
|
21
|
+
'analogy-promoted',
|
|
22
|
+
];
|
|
23
|
+
/**
|
|
24
|
+
* The held-out family. Corrected from the plan's "first-order relaxation",
|
|
25
|
+
* which Phase 0 already encodes as `model-first-order` (design note §4).
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export const HELD_OUT_FAMILY = 'fluid-statics';
|
|
30
|
+
/**
|
|
31
|
+
* Markers that identify the held-out family in model ids, dynamics and bridge
|
|
32
|
+
* ids. `tests/atlas/benchmark.test.ts` scans the atlas for them, and proves the
|
|
33
|
+
* scan can fire with the ORIGINAL family's markers as a positive control.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export const HELD_OUT_MARKERS = [
|
|
38
|
+
'hydrostat',
|
|
39
|
+
'buoyan',
|
|
40
|
+
'archimed',
|
|
41
|
+
'pascal',
|
|
42
|
+
'barometric',
|
|
43
|
+
'fluid-static',
|
|
44
|
+
'fluid statics',
|
|
45
|
+
];
|
|
46
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/atlas/benchmark/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,2EAA2E;AAC3E,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,iBAAiB;IACjB,kBAAkB;IAClB,qBAAqB;IACrB,oBAAoB;IACpB,yBAAyB;IACzB,mBAAmB;IACnB,eAAe;IACf,kBAAkB;CACV,CAAC;AAgBX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,WAAW;IACX,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,cAAc;IACd,eAAe;CAChB,CAAC"}
|