Repository navigation
calibratePowerLaw(): gamma and p_c50 of the powerLaw link from an ELF's flammable map - #168
Merged
Merged
Conversation
…'s flammable map; powerLawPcBounds() Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #168 +/- ##
============================================
Coverage 89.47% 89.48%
============================================
Files 51 52 +1
Lines 4466 4525 +59
============================================
+ Hits 3996 4049 +53
- Misses 470 476 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…(Windows) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
eliotmcintire
added a commit
that referenced
this pull request
Oct 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
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.
Adds a way to set the spread model's one fixed shape number for each ELF from that ELF's own landscape, instead of one value for all ELFs. Nothing changes until
fireSense_spreadFitcalls it (PredictiveEcology/fireSense_spreadFit, same change).Affects: nothing existing; new functions and constants only.
Technical details
gammaof the"powerLaw"link was the fixedspreadPowerLawGamma(1.9,R/constants.R:116), although it is confounded with the coefficient scale and depends on the landscape. NewcalibratePowerLaw()(R/calibratePowerLaw.R) spreads fires withSpaDES.tools::spreadCpp()as the fit andfireSense_burndo (8 directions,escapeSizePixels(),jumpTries,jumpMeanDist) at constant p on the flammable pixels from random starts in the largest connected patch, finds p_c50 where half the fires burn at least 25% of that patch (isotonic regression, interpolated), and givesgammaas the slope of log mean ha onlog(p_c50 - p)below p_c50, with R2 and the per-p table. Results are set by the seed only (one L'Ecuyer-CMRG stream per fire), not bycores, and the caller's RNG state is restored. NewpowerLawPcBounds()(floor + 0.01 to p_c50 + margin;spreadPowerLawPcBoundsstays as the outer limits),spreadPowerLawPGrid, and ledger column namesspreadFitPowerLawPc50Txt,spreadFitPowerLawR2Txt,spreadFitPowerLawPcMarginTxt. On a real ELF mask (14.3, 100 fires per p, 16 cores, 80 s) it gave p_c50 0.264, gamma 3.08, R2 0.98, against 0.265 / 3.25 from the original GAM scripts. Tests:test-calibratePowerLaw.R(uniform map p_c50 near 0.25, breaks raise it, seed and cores, RNG state, error cases, bounds). Full suite 2168 passed, 0 failed (base 2150);R CMD check --no-manual --no-build-vignettes(scratch library): 0 errors, 0 notes, 2 vignette warnings that come only from skipping the vignette build.🤖 Generated with Claude Code
https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6