Repository navigation
New parameter spreadLink: fit climate outside the maxAsymptote ceiling - #81
Merged
Merged
Conversation
spreadLink = "ceiling" (default) is the fit as it was, bit for bit, with the same cache keys and ledger rows. "climateOutside" fits the logistic and its ceiling to the non-climate covariates and adds the climate term on the logit after it (fireSenseUtils::spreadProbFromCovs(climateRef =)). The climate reference is the mean of each climate covariate over the fit's pixel-years (fireSenseUtils::spreadClimateRef(); sim$climateRef_spread), found once in spreadFitPrepare and given to the fit, the threshold calibration (objective and gates), the held-out simulation, the validation figures and the ledger row, which records it with the link (spreadFitClimateRefTxt, spreadLinkTxt). The spread link's body joins the objective bodies in the fit's and the threshold's cache keys. fireSenseUtils floor 0.2.3.9106. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
eliotmcintire
added a commit
that referenced
this pull request
Oct 18, 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 switch that lets a spread fit put drought after the fuel-driven ceiling on spread probability instead of under it, so dry and wet years can differ in how far fires spread. Off by default; existing fits are untouched.
Affects: only runs that set
spreadLink = "climateOutside"; the default fits, cache keys and ledger rows are bit-identical to today.Depends-on: PredictiveEcology/fireSenseUtils#165
Technical details
spreadLink = c("ceiling", "climateOutside"), default"ceiling". With"climateOutside"the logistic and itsmaxAsymptoteceiling are fitted to the non-climate covariates and the climate term is added on the logit after it (fireSenseUtils::spreadProbFromCovs(climateRef =)), with the year effectyearSpreadSDon the same logit.spreadFitPrep()computessim$climateRef_spreadonce (fireSenseUtils::spreadClimateRef(): the mean of each climate covariate over the fit's pixel-years, on the design scale; new output) and stops if the formula has no climate covariate. It is passed wherevercovCentreis: the fit (R/fitSpread.R), the threshold calibration's objective and gates (R/runSpreadWithoutDEoptim.R,estimateSNLLThresholdPostLargeFires()), the held-out simulation and the validation figures (spreadObjFunArgs()), withomitNullArgs()so keys are unchanged when it isNULL.R/spreadFitLedgerRow.R) getsspreadLinkandclimateRef_spread(fireSenseUtils::spreadLinkTxt,spreadFitClimateRefTxt) only for such a fit, sofireSense_spreadPredictapplies the same link; rows of the default link are unchanged.objectiveBodies()now includesspreadProbFromCovs(), the link itself.fireSenseUtilsfloor 0.2.3.9106.Tests:
tests/testthat/test-climateOutside.R(default leaves fit, row and keys as they were; the reference equals the hand-computed mean and whatrunDEoptim()receives; with an intercept it is 0; ledger and held-out rows record link and reference; cache keys omit it only whenNULL; the calibration hands it to objective and gates; no climate covariate stops). Whole module suite: 830 pass.🤖 Generated with Claude Code
https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6