Skip to content

Predict a spreadClimate = "activation" ledger row as the activation - #51

Merged
eliotmcintire merged 2 commits into
developmentfrom
feat/climateActivation
Nov 20, 2026
Merged

eliotmcintire merged 2 commits into
developmentfrom
feat/climateActivation

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

This makes spread prediction read which climate form a fit used and apply it. A fit made with the new "activation" form is predicted with fuel setting each pixel's limit and climate deciding how much of it is reached, the same as during the fit. Older ledger rows predict as before.

Affects: nothing for existing ledger rows; rows written by fireSense_spreadFit with spreadClimate = "activation" are predicted with that form.

Depends-on: PredictiveEcology/fireSenseUtils#255

Technical details

The gap: an activation row has a power-law link, climateRef_spread and p50, which is what ledgerPowerLawPc50() and spreadProbOneELF() (fireSense_spreadPredict.R:712-720, :619-621) read as climate in the ceiling. activationIntercept would also be taken as a covariate coefficient and stop as one "without a covariate" (:546).

The change:

  • ledgerSpreadClimate(): the row's fireSenseUtils::spreadClimateTxt. A row without it is "ceiling" when it has climateRef_spread and a power-law link, else "predictor", as before; an unknown value stops.
  • ledgerLinkArgs() adds spreadClimate = "activation" for such a row only, so other rows' calls are unchanged. spreadProbOneELF() then takes activationIntercept out with the random effects and gives it to fireSenseUtils::spreadLinkInputs(). A set and its row that disagree stop.
  • ledgerLinkNumber() checks the row's link with fireSenseUtils::checkLinkParams(activation =).
  • The per-pixel pc and the climate x go out through linkParsRas() and linearPredictorRas() as with the ceiling, so fireSense_burn (powerLawPars(), linkedSpread()) adds the year draw to x with no change.
  • reqdPkgs: fireSenseUtils@development (>= 0.2.3.9183).

Reuses: ledgerLinkArgs(), ledgerLinkNumber(), ledgerClimateRef(), ledgerSpreadLink(), spreadProbOneELF() (extended in place), linkParsRas(), linearPredictorRas(), fireSenseUtils::spreadLinkInputs(), checkLinkParams(), spreadClimateOptions; new: ledgerSpreadClimate() (no reader of the new column existed; it holds the fallback rule for older rows).

Tests: new tests/testthat/test-climateActivation.R: p per pixel equals the formula and stays at or below p50; fireSense_SpreadLinear is the climate term and fireSense_SpreadPowerLaw holds per-pixel pc; burn's reading of those outputs and the fit's own spreadLinkInputs() on the same parameters give the predicted p; a row without the column predicts exactly as a "ceiling" row; mismatched rows and a wrong lower asymptote stop. On the base module the new file fails (all 4 tests, 7 failures and errors). Full suite (SpaDES.core::convertToPackage() + testthat::test_local()): branch 109 tests, 0 failed, 0 skipped, 407 expectations; base 105 tests, 0 failed, 388 expectations.

Second commit (Fable review):

  • M1: an activation ELF blended with an ELF of another mode stops, beside the link check. A ceiling ELF with a predictor ELF still blends: test-climateCeiling.R (merged with Climate moves the power-law ceiling (spreadClimate = ceiling) #49) tests that blend, and stopping it would change results of the existing modes.
  • L4: ledgerLinkArgs() passes the mode whenever the row records it. "predictor" then keeps climate in x even with climateRef_spread; "ceiling" or "activation" without one stops. Rows that record nothing are as before.
  • L3: the activation's lower-asymptote check uses the run's lowerSpreadProb (ledgerLinkArgs(floor =), through ledgerLinkNumber()).

Full suite after the second commit, against PredictiveEcology/fireSenseUtils#255 installed at 0.2.3.9183: 112 tests, 0 failed, 0 skipped, 414 expectations (base 105 tests, 0 failed).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh

@eliotmcintire eliotmcintire added the enhancement New feature or request label Nov 20, 2026
ledgerSpreadClimate() reads the row's mode (fireSenseUtils::spreadClimateTxt);
a row without it is "ceiling" with climateRef_spread and a power-law link, else
"predictor", as before. ledgerLinkArgs() passes spreadClimate = "activation" for
such a row only; spreadProbOneELF() then takes activationIntercept out of the
covariate coefficients and gives it to fireSenseUtils::spreadLinkInputs(), and
stops when the set and the row disagree. ledgerLinkNumber() checks the
activation's link with checkLinkParams(activation =). The per-pixel parameters go
out through linkParsRas() as with the ceiling, so fireSense_burn 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
ledgerLinkArgs() passes the mode whenever the row records it (Fable review L4):
'predictor' then keeps climate in x even with a climateRef, and 'ceiling' or
'activation' without one stops. An activation ELF blended with an ELF of another
mode stops beside the link check (M1); ceiling with predictor blends as before.
The activation's lower-asymptote check uses the run's lowerSpreadProb (L3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
@eliotmcintire
eliotmcintire merged commit 43f6dd8 into development Nov 20, 2026
9 checks passed
@eliotmcintire
eliotmcintire deleted the feat/climateActivation branch November 20, 2026 13:25
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant