Repository navigation
Add the "powerLaw" spread link - #31
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
…t to x; drop the warning 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 the spread prediction use fits made with the new power-law link, so a fit and its prediction agree. It is off unless the fit used that link.
Affects: Fits made with
spreadLink = "powerLaw"are predicted with that link; every other ledger row, including all existing ones, predicts as before.Depends-on: PredictiveEcology/fireSenseUtils#167
Technical details
spreadProbOneELF()(fireSense_spreadPredict.R) always calledspreadProbFromCovs()with the default link, so a power-law row would have been predicted as a logistic. NewledgerPowerLawGamma()reads the row'sspreadLinkandpowerLawGamma_spread(written by fireSense_spreadFit's ledger row) and passes them aslink = "powerLaw"andpowerLawGamma; the one function the fit uses,spreadProbFromCovs(), then gives the samep(the fit'smaxAsymptoteisp_c). A power-law row without a valid gamma stops. It also outputsfireSense_SpreadPowerLaw(pc,gamma,floor; a vector with one ELF, a 3-layer raster blended likefireSense_SpreadSDwith several; NULL for other links) so thatfireSense_burncan add the year effect to the linear predictor as the fit does (PredictiveEcology/fireSense_burn, follow-up PR); the earlier warning is gone.Tests: new
test-powerLaw.R(hand-computed values for one and several ELFs, other links unchanged, missing gamma, the new output). The fit-to-ledger-to-predict round trip is covered in two halves, because the modules' test environments are separate: the fit module's test checks the row it writes, this one builds a row with the samefireSenseUtilscolumn constants and checks the prediction. Module suite (scratch library, fireSenseUtils from that PR, locally numbered 0.2.3.9107): 199 pass, 0 fail on this branch; 168 pass, 0 fail on development, where the new test file errors at its first line.reqdPkgsfloor isfireSenseUtils@development (>= 0.2.3.9107); no version bump.🤖 Generated with Claude Code
https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6