Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# fireSense_ignitionPredict (development version)

- Comments only: the ignition and escape models from `fireSense_ignitionFit` use `count:poisson`, not Tweedie, and the comments now say so.

# fireSense_ignitionPredict 1.2.0

This release fixes two errors that changed how many fires the module predicted. Weather and landscape conditions are now compared against the conditions the model was fitted on; before, each year was compared only with itself, so every year looked average to the model and hot or dry years did not stand out. And when several fires started in the same area, the module could count more escaped fires than actually escaped; each escape is now counted once. Results will differ from earlier versions, and should be more realistic.
Expand Down
4 changes: 2 additions & 2 deletions fireSense_ignitionPredict.R
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ IgnitionPredictRun <- function(sim) {
if (rescaleVars) covsHere <- scaleAsFit(covsHere, f$ign$scaleData, "fireSense_IgnitionFitted")
predsIgns[f$rows] <- foldMeanPrediction(f$ign, covsHere)
}
igns <- rpois(NROW(predsIgns), lambda = predsIgns) # can't use rtweedie because don't know the dispersion parameter
igns <- rpois(NROW(predsIgns), lambda = predsIgns) # the ignition model is Poisson (count:poisson), so its prediction is the Poisson mean

whHasIgns <- which(igns > 0)
predsEscs <- rep(NA_real_, NROW(igCov))
for (f in fits) {
rowsEsc <- intersect(whHasIgns, f$rows)
covsHere <- igCov[rowsEsc]
if (rescaleVars) covsHere <- scaleAsFit(covsHere, f$esc$scaleData, "fireSense_EscapeFitted")
# the escape model is tweedie, so can go above 1, below 0 rarely
# the escape model is Poisson (count:poisson), so its mean can go above 1, never below 0
predsEscs[rowsEsc] <- foldMeanPrediction(f$esc, covsHere, clamp01 = TRUE)
}
predsEscs <- predsEscs[whHasIgns]
Expand Down
Loading