Repository navigation
spreadClimate = "activation": fuel sets each pixel's ceiling, climate is fitted with its own intercept - #142
Merged
Merged
Conversation
With spreadClimate = "activation" fuel sets each pixel's ceiling below p50 and climate is the linear predictor (fireSenseUtils::spreadLinkInputs()). The bounds leave out maxAsymptote (maxAsymptoteBoundsOf(activation =)) and add activationIntercept after the covariates (new parameter activationInterceptBounds, default fireSenseUtils::spreadActivationInterceptBounds). The fit gets climateRef and p50 as the ceiling mode does (climateAsReference(), spreadPowerLawPc50()); checkSpreadLink() accepts the mode and checks its link with fireSenseUtils::checkLinkParams(activation =). The ledger row gets p50 as maxAsymptote (addFixedParsToLedger(maxAsymptote =)) and, for a mode other than "predictor", its spreadClimate (fireSenseUtils::spreadClimateTxt); a "predictor" row is unchanged. Floor fireSenseUtils >= 0.2.3.9183 (PredictiveEcology/fireSenseUtils#255). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
…ixes powerLawPcAtP50 (from #141, without its equal bounds): maxAsymptoteBoundsOf() returns NULL for it as for the activation (still checking p50), spreadLinkArgs() gives the objective pcAtP50 = TRUE and p50, the ledger row has p50 as maxAsymptote and pcAtP50_spread = TRUE. Equal bounds gave the emulator start a zero-width dimension (NaN in emulatorSpace()); a test runs the emulator on the new bounds. Stops with the ceiling or a non-power-law link, as #141. Activation (Fable review): the formula intercept is bounded by the new activationFuelInterceptBounds, c(-6, 6) (M2); the fit reports, and an activation row stores, each set's dud-year share (H1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
eliotmcintire
added a commit
that referenced
this pull request
Nov 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
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.
This lets a spread fit use the new "activation" form: fuel sets how far each pixel can spread at most, and climate decides how much of that is reached in a given year. The fit then estimates a climate intercept instead of a single spread ceiling. The ledger row says which form it used, so prediction applies the same one.
Affects: nothing for fits with
spreadClimate = "predictor"or"ceiling";spreadClimate = "activation"is a new option.Depends-on: PredictiveEcology/fireSenseUtils#255
Technical details
The gap:
spreadClimateaccepts only "predictor" and "ceiling" (R/fitSpread.R:293), the bounds always fitmaxAsymptote(fireSense_spreadFit.R:1233), and a ceiling row and an activation row would look the same in the ledger (R/spreadFitLedgerRow.R:39-43).The change:
spreadClimate = "activation":checkSpreadLink()accepts it and checks its link withfireSenseUtils::checkLinkParams(activation = TRUE)("powerLawSmooth",lowerAsymptoteat the floor). It getsclimateRef_spreadand p50 like "ceiling" (climateAsReference(),spreadPowerLawPc50(), sospreadLinkArgs()carries p50 to the fit, the gates, the debug call and the validation figures).maxAsymptoteBoundsOf(activation = TRUE)is NULL, soestimateSpreadParams()leavesmaxAsymptoteout; it addsactivationInterceptafter the formula terms, before the sds, from the new parameteractivationInterceptBounds(defaultfireSenseUtils::spreadActivationInterceptBounds,c(-10, 10)). The objective learns the mode from the bounds (fireSenseUtils::spreadRandomEffectArgs()), so the emulator path needs nothing new.addFixedParsToLedger(maxAsymptote =)puts p50 first, where the objective uses it (fixedMaxAsymptote()), so the row's params have the usual shape. A fit withspreadClimateother than "predictor" writes it (fireSenseUtils::spreadClimateTxt). A "predictor" row is unchanged, astest-climateOutside.Rrequires.fireSenseUtils@development (>= 0.2.3.9183).Reuses:
isCeiling(),climateAsReference(),spreadPowerLawPc50(),spreadLinkArgs(),maxAsymptoteBoundsOf(),estimateSpreadParams(),addFixedParsToLedger(),checkSpreadLink(),spreadFitLedgerRow()(each extended in place),fireSenseUtils::checkLinkParams(),spreadRandomEffectArgs(),spreadClimateOptions,logisticParamNames; new:isActivation(),activationInterceptBoundsOf(),fixedMaxAsymptote()(one-line accessors besideisCeiling(); nothing existing names the mode or its bounds).Tests: new
tests/testthat/test-climateActivation.R: the bounds (nomaxAsymptote,activationInterceptbeforeyearSpreadSD, its own bounds), the ledger row (mode, p50 asmaxAsymptote, the intercept), "predictor" and "ceiling" unchanged, the link and climate-covariate stops,addFixedParsToLedger(), and p50 reaching the gates and validation figures. The metadata tests list the new parameter. On the base module the new file fails: all 6 tests (10 failures and errors). Full suite (SpaDES.core::convertToPackage()+testthat::test_local(), as the shared workflow): branch 297 tests, 0 failed, 0 skipped, 1368 expectations; base 291 tests, 0 failed, 0 skipped, 1330 expectations.FireSenseTesting wiring for an arm:
FS_SPREAD_CLIMATE = "activation"already reachesspreadClimate; the arm is lp05 +FS_SPREAD_CLIMATE = "activation"+FS_SPREAD_SD_BOUNDS = "0,1".Second commit:
powerLawPcAtP50(parameter, stop conditions and tests from Add powerLawPcAtP50: fix p_c at the calibrated p50 #141, minus its equal-bounds DEoptim test):maxAsymptoteBoundsOf(pcAtP50 = TRUE)leavesmaxAsymptoteout, as for the activation, and still checks p50 against the outer limits.spreadLinkArgs()gives the objectivepcAtP50 = TRUEand p50; the ledger row has p50 asmaxAsymptoteandpcAtP50_spread = TRUE. A test runs the emulator start on these bounds: finite unit cube,pcAtP50in its objective arguments, a population in bounds. The same test shows equal bounds give NaN.activationFuelInterceptBounds(defaultc(-6, 6); M2). The fit reports each set's dud-year share, and an activation row stores it (dudYearShare_spread; H1).activationInterceptkeepsc(-10, 10).lowerSpreadProbparameter; the objective usesspreadProbFloor, which is alreadycheckLinkParams()'s defaultfloor.Reuses (second commit):
maxAsymptoteBoundsOf(),estimateSpreadParams(),spreadLinkArgs(),spreadPowerLawPc50(),fixedMaxAsymptote(),spreadFitLedgerRow()(extended),fireSenseUtils::powerLawPcBounds(),activationDudYearShare(),emulatorSpace(),emulateObjective(); new:pcAtP50()(one-line accessor besideisActivation()).Full suite after the second commit, against PredictiveEcology/fireSenseUtils#255 installed at 0.2.3.9183: 303 tests, 0 failed, 0 skipped, 1403 expectations (base 291 tests, 0 failed).
🤖 Generated with Claude Code
https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh