1 lightning.finite_horizon.studies.first_model_analysis
lightning.finite_horizon.studies.first_model_analysis
Explore sealed Q1 predictions without fitting or changing checkpoint selection.
Run python -m scripts.first_model_posthoc --study ... --output .... States and recipes are dependent within a physical scene. All intervals hold weights fixed and are exploratory; no finding changes the frozen readiness gate.
1.1 Classes
| Name | Description |
|---|---|
| FirstModelAnalysis | Fixed-weight, scene-paired post-hoc product with detached state observations. |
| FirstModelPhysicalSceneContrast | Fixed-weight paired scene observations and their existing bootstrap summary. |
1.1.1 FirstModelAnalysis
lightning.finite_horizon.studies.first_model_analysis.FirstModelAnalysis(
summary_json,
records_json,
)Fixed-weight, scene-paired post-hoc product with detached state observations.
1.1.1.1 Attributes
| Name | Description |
|---|---|
| physical_scene_contrasts | Project existing reductions without refitting or resampling observations. |
1.1.2 FirstModelPhysicalSceneContrast
lightning.finite_horizon.studies.first_model_analysis.FirstModelPhysicalSceneContrast(
metric,
comparison,
seed,
scene_ids,
scene_values,
mean,
ci95,
scene_count,
)Fixed-weight paired scene observations and their existing bootstrap summary.
1.2 Functions
| Name | Description |
|---|---|
| admit_archived_first_model_analysis | Compute fixed-weight post-hoc evidence using only authenticated portable inputs. |
| admit_first_model_analysis | Validate original support before computing the fixed-weight analysis. |
| analyze | Bind sealed receipts before deriving state tables and paired comparisons. |
| estimate | Describe equal-scene values and conditional percentile mean uncertainty. |
| scene_matrix | Reduce states then recipes; reject missing recipe/scene/role coverage. |
| state_metrics | Describe original supported candidates, preserving global action indices. |
| trajectory | Explore prefix regret contrasts with pointwise and simultaneous bands. |
1.2.1 admit_archived_first_model_analysis
lightning.finite_horizon.studies.first_model_analysis.admit_archived_first_model_analysis(
archive,
prefix,
)Compute fixed-weight post-hoc evidence using only authenticated portable inputs.
1.2.2 admit_first_model_analysis
lightning.finite_horizon.studies.first_model_analysis.admit_first_model_analysis(
study,
)Validate original support before computing the fixed-weight analysis.
1.2.3 analyze
lightning.finite_horizon.studies.first_model_analysis.analyze(study)Bind sealed receipts before deriving state tables and paired comparisons.
1.2.4 estimate
lightning.finite_horizon.studies.first_model_analysis.estimate(values, draws)Describe equal-scene values and conditional percentile mean uncertainty.
1.2.5 scene_matrix
lightning.finite_horizon.studies.first_model_analysis.scene_matrix(
frame,
metric,
scenes,
)Reduce states then recipes; reject missing recipe/scene/role coverage.
Return a float64 array with axes (role, scene). There must be exactly two recipes per scene for every role; an absent observation is never zero.
1.2.6 state_metrics
lightning.finite_horizon.studies.first_model_analysis.state_metrics(
row,
tie_band,
)Describe original supported candidates, preserving global action indices.
Uniform regret is the analytic expected regret of selecting each admitted action with equal probability. It needs no prediction or fitted parameter. The fraction of practically better actions uses the original utility band; ties do not count against a choice. Calibration spread uses population SD. Candidate-mean signed error is a common offset: MSE equals its square plus centered error MSE. This descriptive decomposition uses the same supported FP32 residuals and does not fit a held-out calibration. Single-candidate margins are missing; top-three overlap uses the available candidate count and deterministic global-index tie breaking.
1.2.7 trajectory
lightning.finite_horizon.studies.first_model_analysis.trajectory(
frame,
scenes,
draws,
)Explore prefix regret contrasts with pointwise and simultaneous bands.
Shared physical-scene draws cover the 32 selected/final × 16-prefix macro contrasts. The simultaneous band uses the bootstrap maximum absolute standardized centered mean, with fixed empirical scene standard errors. It is approximate and conditional, not a post-selection confirmatory test.