Density-dependent bridge correction v31: capped linear, holdout validated#45
Merged
Merged
Conversation
…ated v30 identified BA_t1 as the strongest single predictor of per-plot residual on 12.3.9 production posture (R^2=0.188, p=1.4e-5). v31 implements the post-projection correction as a ready-to-ship bridge helper with 200-iter 50/50 holdout validation. Formula: raw_residual = 40.6345 + (-0.334383) * BA_t1 capped = max(-25, min(25, raw_residual)) BA_corrected = BA_pred - capped Holdout results (200 random 50/50 splits, n=93): config test_raw_bias test_corr_bias test_R^2_corr Linear no cap +10.86% +0.41% 0.481 Linear +/-25 +10.86% +2.11% 0.479 <- production Linear +/-20 +10.86% +3.14% 0.471 Quadratic +/-25 +10.86% +3.85% 0.489 Selected: linear +/-25 cap. Near-zero mean test bias (+2.1%), near-best test R^2 (0.479), protection against extreme corrections (+/-25 ft^2/ac is roughly +/- 26% of mean observed BA). Deliverable: apply_density_correction.R provides: apply_density_correction(BA_pred, BA_t1, cap=25) -> corrected apply_density_correction_verbose(BA_pred, BA_t1) -> diagnostic df ACD_DENSITY_CORRECTION named list of coefficients + provenance Smoke test verified on Cardinal R 4.4.0: cap activates at extremes (BA_t1=20 -> +25 capped from +33.9; BA_t1=220 -> -25 capped from -32.9), crossover at BA_t1=121.5 gives correction ~0. Caveats: - Calibration on n=93 ME FIA, 10-yr remeasurement, 12.3.9 production - Do NOT apply to Canadian MAGPlot (v17 showed +0.4% baseline) - Not validated on non-ME FIA conditions - Structural fix (BAL coefficient refit) still pending as paper-sized
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v30 identified BA_t1 as the strongest single predictor of per-plot residual on 12.3.9 production posture (R^2=0.188, p=1.4e-5). v31 implements the post-projection correction as a ready-to-ship bridge helper with 200-iter 50/50 holdout validation.
Production formula
Holdout validation (200 iter, 50/50 splits, n=93)
Selected: linear ±25 cap. Near-zero mean test bias, near-best test R^2, protection against extreme corrections.
Deliverable
apply_density_correction.Rprovides:apply_density_correction(BA_pred, BA_t1, cap=25)-> corrected vectorapply_density_correction_verbose(...)-> diagnostic data frameACD_DENSITY_CORRECTIONnamed list of coefficients + provenanceSmoke test verified on Cardinal R 4.4.0.
Caveats