Skip to content

Predict expected ignitions and escapes only; draw them in fireSense_burn - #33

Merged
eliotmcintire merged 1 commit into
developmentfrom
feat/draws-in-burn
Oct 16, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
feat/draws-in-burn

Conversation

@eliotmcintire

Copy link
Copy Markdown
Collaborator

This module now only predicts how many ignitions and escapes to expect in each coarse pixel; the random draws are made in fireSense_burn, as the spread and year effect already are. Escapes are now predicted for every pixel and follow the fitted count model.

Affects: Results change: escapes follow the fitted Poisson model instead of a binomial, and the draws move to fireSense_burn, so a seed no longer reproduces earlier runs. This must be merged and used together with the fireSense_burn PR.

Technical details

Defect: IgnitionPredictRun() (fireSense_ignitionPredict.R:143-222 on development) predicted and drew: rpois for ignitions, escape predicted only where an ignition was drawn and clamped to [0, 1] (foldMeanPrediction(clamp01 = TRUE)), rbinom(size = ignitions, prob = mean), placement on fine pixels. Both fits are xgboost count:poisson, so the escape mean is a count, not a probability.

Fix: both surfaces are predicted for every flammable coarse pixel (per-fold predictions floored at 0, no upper clamp). New output fireSense_IgAndEscapeDistribution = list(ignition, escape) is read from model$params$objective of every fold of every ELF; it stops if unreadable or if folds or ELFs disagree, naming the ELFs. ignitionsAndEscapes, placeIgnitions(), coarseToFineMap(), fineCoarseTable() and the flammableRTM input are removed (they move to fireSense_burn).

Tests: placement tests moved to fireSense_burn; new tests for the full escape surface, the objective read, and the errors for unreadable, fold-mismatched and ELF-mismatched objectives. convertToPackage() + test_local(): 35 tests, 0 failures on the branch; 45 tests, 0 failures, 2 skipped on development. The new tests run against the development code give 7 failures and 23 errors.

🤖 Generated with Claude Code

…burn

IgnitionPredictRun() predicted ignitions, drew them (rpois), predicted escapes only where
one was drawn, drew escapes (rbinom) and placed ignitions on fine pixels. It now predicts
both surfaces for every coarse pixel and reports the fitted objective in
fireSense_IgAndEscapeDistribution. placeIgnitions(), coarseToFineMap() and fineCoarseTable()
and ignitionsAndEscapes move to fireSense_burn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eliotmcintire eliotmcintire added enhancement New feature or request breaking change Existing code or results need changes to keep working labels Oct 15, 2026
@eliotmcintire
eliotmcintire merged commit fbd4246 into development Oct 16, 2026
9 checks passed
@eliotmcintire
eliotmcintire deleted the feat/draws-in-burn branch October 16, 2026 00:05
eliotmcintire added a commit that referenced this pull request Oct 16, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Existing code or results need changes to keep working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant