Repository navigation
Spread fuel effect: change in spread probability per fuel, for the ELF map - #260
Merged
Merged
Conversation
… in spread probability a fuel makes, comparable between fuels Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #260 +/- ##
===============================================
+ Coverage 93.61% 93.74% +0.13%
===============================================
Files 73 75 +2
Lines 5466 5614 +148
===============================================
+ Hits 5117 5263 +146
- Misses 349 351 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…; spreadFuelEffect() calls them Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
…spreadCovStats(): centre and fuel summary in one pass; elfCoefLabel uses the fuel prefix regex Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
…ffect, different-model effects Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
eliotmcintire
added a commit
that referenced
this pull request
Nov 23, 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.
The raw fuel coefficients on the ELF map run from about 2 to 80 and cannot be compared between species. This adds a comparable number for each fuel: how much the chance of fire spread changes when that fuel goes from absent to its typical amount.
Affects: adds a "Spread fuel effect" group (
spreadEffect_<fuel>, probability) to the ELF map features. It is empty for every ELF until a spread fit is rerun with the matchingfireSense_spreadFitchange, because older ledger rows lack the fit-data summary. No existing ledger column or result changes.Technical details
Defect: no function turns a fuel coefficient into an effect. The covariate is class biomass over 1e4 (0 outside the class), classes differ hugely in biomass, the power-law link saturates and correlated classes trade off, so coefficients are not comparable (
R/elfFeatures.Rreturned only the raw mean coefficient).Fix:
spreadFuelEffect(row)(newR/spreadFuelEffect.R; one row per scenario of source columns, the interactions made byspreadAddInteractions()as in the fit,youngAge0 in both scenarios): per fuel term of a ledger row, the change in spread probability from 0 to the term's median non-zero value, all other covariates at their centres (covCentre_spread), through the row's link, averaged over the row's parameter sets. A fit at its ceiling gives about 0.spreadCovStats()(R/spreadProbGates.R): in one pass over the years, the centres (spreadCovCentre()is now a wrapper) and the median non-zero value and sd of the fuel covariates. The year loop ofspreadCovMeans()becameeachSpreadYearCovs(), shared by both.spreadFitCovMedianNonZeroTxt(covMedianNonZero_spread) andspreadFitCovSDTxt(covSD_spread).elfFuelEffects()andelfFeatures(): onespreadEffect_<coefficient>feature per species, in group "Spread fuel effect", with the same per-ELF note as the coefficients. A row without the summary givesNAand the note "no fit-data summary" (no feature).elfSpreadCoefs()andelfFuelEffects()is.modelForm()/.paramMeans().Reuses:
ledger*()readers (moved here),spreadProbFromCovs()(the one link evaluation, also behindfireSense_spreadPredict'sspreadProbOneELF(), which is in a module and cannot be called from here),spreadCovMeans()loop,spreadDesignCols()/spreadSourceCols(),logisticParamNames, the link and ledger column constants,.fuelTermsBySpecies(),elfCoefLabel(); new:spreadFuelEffect()/spreadFuelTerms()(no function maps a ledger row to a probability change),spreadCovStats()(no function gives a median non-zero value or sd),elfFuelEffects().The ledger-row readers (
ledger*(),R/ledgerRow.R) moved here unchanged fromfireSense_spreadPredict(PredictiveEcology/fireSense_spreadPredict#52), andspreadFuelEffect()calls them, so no row-reading code is repeated. 3 tests added (test-ledgerRow.R); full suite on the branch is now 897 tests, 0 failed, 0 errors, 10 skipped.Tests (
test-spreadFuelEffect.R, 9 new): known change in p for the logistic and power-law links, averaging over sets, saturation (intercept 30, coefficient 80: change under 1e-6), no-summary rows,spreadCovStats()by hand,elfFuelEffects()per species,elfFeatures()group/label/units. Full suite on the branch: 892 tests, 0 failed, 0 errors, 10 skipped. On base (development with the new test file): 9 errors, all in the new file, everything else passes.R CMD check --no-manual(scratch library): 0 errors, 0 warnings, 1 note (objFunInner: no visible binding for 's', already on development).checkDocFilesandcodocare clean.No fit data is on disk: ELF ledgers hold parameters only, and the spread covariate tables exist only inside hash-keyed Cache entries that carry no ELF or ledger-row link, so rows without the new columns give
NA.Version note: fireSenseUtils#261 is merged and development is 0.2.3.9190, so #260 becomes 0.2.3.9191 when merged. The floors in fireSense_spreadFit#144 and fireSense_spreadPredict#52 name 9191 as a placeholder until then.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh