Skip to content

A species or fuel class absent from the vegetation is 0 for a stored fit - #46

Closed
eliotmcintire wants to merge 2 commits into
developmentfrom
absentSpeciesCols
Closed

eliotmcintire wants to merge 2 commits into
developmentfrom
absentSpeciesCols

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

A saved spread model can predict in a run whose vegetation lacks a fuel class the model was trained with. The missing class is treated as having no biomass.

Affects: Runs whose vegetation lacks a fuel class of the fitted spread model predict with no biomass for it instead of stopping with "have no covariate"; climate, non-forest and other missing covariates still stop.

Depends-on: PredictiveEcology/fireSenseUtils#245

Technical details

Defect: fireSense_spreadPredict.R spreadProbOneELF() stopped (noCov) for any fitted covariate missing from covs. Fix: addAbsentSpeciesCols(covs, needed, value = logMinB(0)) (the value fuelCovsToCoarse() gives a class with no biomass) before the fuel-scale handling, so a linear-fuel fit undoes the log for it too and rescaling is unchanged. needed is spreadSourceCols(fitted), so interaction terms are not mistaken for species. The test that a missing interaction fuel covariate stops now expects the 0-biomass prediction and checks that a missing youngAge still stops.

Update: with an unseen fuel covariate in the covariates, an absent fitted fuel class is not zero-filled and the existing stop stays (a new test checks it).

Reuses: fireSenseUtils::addAbsentSpeciesCols()/absentSpeciesCols()/foldFeatureNames() (fireSenseUtils#245); new: none (the helper lives in fireSenseUtils so the three modules share it).

Tests: new test in test-youngAgeExclusivity.R (linear-fuel and log-scale fits equal an explicit logMinB(0) column) and the rewritten interaction test. Branch: 363 passed, 0 failed, 0 skipped. Base with the new tests: 357 passed, 2 errors (the new tests). No version bump; the reqdPkgs floor for the new fireSenseUtils functions is set after fireSenseUtils#245 merges. Scratch library /home/emcintir/R/scratch-absent (fireSenseUtils branch installed).

🤖 Generated with Claude Code

https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6

@eliotmcintire eliotmcintire added bug Something isn't working backwards compatible Existing code and results keep working unchanged labels Nov 17, 2026
…ks; exclude drought indices from species columns

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
@eliotmcintire

Copy link
Copy Markdown
Collaborator Author

Closing: a species missing from the run's vegetation should stop the run, not become zero biomass. The one case that hit this (11.3 Pinu_con) was a stale ELF map, which a silent zero would have hidden. That map bug is fixed in fireSense_ELFs#49.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards compatible Existing code and results keep working unchanged bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant