Density correction v33: pooled refit + asymmetric cap (supersedes v31)#46
Merged
Conversation
v32 fresh-sample test (seed=2027, n=91) revealed v31 over-corrects high-density stands. v32 BA_t1 R^2 dropped to 0.057 (vs v30 0.188), and v31 +/-25 cap made Q4 worse (+5.5% raw -> +16.2% corrected). v33 pools v30 + v32 (n=184), refits, and applies asymmetric cap. raw_correction = 36.9549 + (-0.235987) * BA_t1 bounded = max(0, min(25, raw_correction)) BA_corrected = BA_pred - bounded 5-fold CV (50 shuffles, n=184): Uncorrected +14.46% bias R^2 0.380 Symmetric +/-25 cap +1.38 +/- 0.12 R^2 0.472 Asymmetric (0, +25) +0.21 +/- 0.11 R^2 0.484 <- production Asymmetric (0, +20) +1.65 +/- 0.08 R^2 0.472 Asymmetric (0, +15) +3.77 +/- 0.08 R^2 0.457 The asymmetric cap (lower 0, never push BA up) preserves the high-density correctness while still dampening overshoot at low and mid densities. Crossover at BA_t1 = 156.6 ft^2/ac. Updated apply_density_correction.R API: apply_density_correction(BA_pred, BA_t1, upper_cap=25, lower_cap=0) ACD_DENSITY_CORRECTION list updated with v33 coefficients, CV stats, and supersedes flag for v31. Smoke tested on Cardinal: low-density correctly clamped to upper cap, high-density correctly preserved at zero correction.
holoros
added a commit
that referenced
this pull request
May 29, 2026
Single consolidated end-of-arc handoff. Anyone can read this one document and fully load context for the entire AcadianGY divergence work. Covers: 12.3.5 baseline -> 12.3.6 MORTCAL -> 12.3.7 ingrowth Part 1 -> 12.3.8 ingrowth Part 2 -> 12.3.9 CSI_SCALE knob v17-v18 follow-on validation (MAGPlot, FIA calibration decomp) v24-v27 sensitivity scans (CSI, mort.mult, site index, BGI) v28-v29 CSI_SCALE validation and BGI null v30 residual regression (BA_t1 signal) v31 first correction (superseded) v32 fresh-sample test showing v31 over-corrects high-density v33 pooled refit + asymmetric cap (current ship) Operating recommendations split by region (FIA Maine vs Canadian MAGPlot). Files of record. Commit ledger #32-#46. Open follow-ups.
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.
Supersedes v31 (PR #45). v32 fresh-sample test (seed=2027, n=91) revealed v31 over-corrects high-density stands. v32 BA_t1 R^2 dropped to 0.057 (vs v30 0.188), and v31 +/-25 cap made Q4 worse (+5.5% raw -> +16.2% corrected).
v33 pools v30 + v32 (n=184), refits, and applies an asymmetric cap so the correction can only subtract from BA_pred, never add.
v33 production formula
Crossover at BA_t1 = 156.6 ft^2/ac. Beyond that, raw BA_pred is preserved.
5-fold CV (n=184, 50 random shuffles)
API change
apply_density_correction(BA_pred, BA_t1, upper_cap=25, lower_cap=0)Defaults give the asymmetric production behavior. Setting
lower_cap=-25recovers v31 symmetric behavior if needed for compatibility.What v31 got wrong
v31 fit a steep slope (-0.334) on a sample where low-density plots had heavy overshoot. The slope was too aggressive at high density. The v33 pooled slope (-0.236) is shallower and the asymmetric cap prevents any damage to high-density stands.
Caveats unchanged