Repository navigation
Add the "powerLaw" spread link - #83
Merged
Merged
Conversation
fireSense_spreadFit: spreadLink = "powerLaw", powerLawGamma, p_c bounds, ledger columns. fireSense_spreadPredict: reads the row's link and gamma and applies powerLawLink via spreadProbFromCovs. Floor fireSenseUtils (>= 0.2.3.9107). 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.
Lets a spread fit use the new power-law link, in which a year's random effect cannot push fires past the percolation threshold. It is off by default.
Affects: Nothing changes unless
spreadLink = "powerLaw"is set; the default fit, ledger row and cache keys are as before.Depends-on: PredictiveEcology/fireSenseUtils#167
Technical details
spreadLinktook only"ceiling"and"climateOutside"(fireSense_spreadFit.R:117) and was not validated. It now also takes"powerLaw", with a new parameterpowerLawGamma(defaultfireSenseUtils::spreadPowerLawGamma, 1.9, fixed, not fitted). Thelinkhanded to the objective comes fromspreadLink(P(sim))(R/fitSpread.R),powerLawGammagoes torunDEoptim(),runSpreadWithoutDEoptim()(objective and gates), the held-out simulation and the validation;spreadFitLedgerRow()writesspreadLinkandpowerLawGamma_spreadsofireSense_spreadPredictapplies the same link.p_c(maxAsymptote) is bounded byfireSenseUtils::spreadPowerLawPcBounds, 0.14 to 0.276 (just abovespreadProbFloor, up to the usual ceiling, above the percolation threshold of about 0.25); the covariates' bounds are unchanged (sign only). An unknownspreadLink,"powerLaw"withlink = "logistic3pUpper", or a badpowerLawGammastops.powerLawGammais left out of the fit's and the threshold's cache keys unless the link is"powerLaw";objectiveBodies()now also holdslogisticAll()andpowerLawLink(), so the first run after the update re-runs a cached fit.Tests: new
test-powerLaw.R(bounds, link and gamma to the fit, threshold and held-out simulation, ledger row, validation, cache-key omission); the toy-fit helpers oftest-climateOutside.Rmoved tohelper-spreadLink.R. Module suite (convertToPackage, test_local, scratch library with fireSenseUtils from that PR, locally numbered 0.2.3.9107): 878 pass, 0 fail on this branch; 830 pass, 0 fail on development, where the new test file errors at its first line (nospreadFitPowerLawGammaTxt).reqdPkgsfloor isfireSenseUtils@development (>= 0.2.3.9107); no version bump.🤖 Generated with Claude Code
https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6