skipUnusedFitPrep is now TRUE by default, as in fireSense_dataPrepFit: a job that does not fit, validate, profile or hold out a fold no longer schedules spreadFitPrepare. Set it FALSE for both modules (.globals = list(skipUnusedFitPrep = FALSE)) to prepare everything, as before.
A spread formula can have fuel x climate interaction terms (a:b, set by fireSense_dataPrepFit’s spreadInteractions = "climate:fuel"): each is fitted by DEoptim like any other term, as the coefficient after the main effects. estimateSpreadParams() gives it the symmetric bounds +/- upperAndLowerVal with no sign constraint (it was matched by droughtIndexPattern when its climate covariate is a drought index, which would have fixed its lower bound at 0). The covariate centre (covCentre_spread) has the mean of each covariate an interaction multiplies (none for the interaction itself: it is the product of the centred covariates), which the objective, the validation and fireSense_spreadPredict form with fireSenseUtils::spreadProbFromIntegerCovs(); covMinMax_spread is unchanged (an interaction is rescaled through its covariates). A formula without interactions gives the same bounds, parameters and ledger row. Needs fireSenseUtils >= 0.2.3.9177 (#242).
New mode “profile”: the job fits nothing and writes no ledger row. After spreadFitPrepare its profileFromLedger event profiles this ELF’s ledger fit (profileLedgerFit(), R/profileLedgerFit.R): each coefficient of the new parameter profileCoefs (NA: every covariate coefficient; "fuel": the fuel biomass ones) is set in turn to each value of the new parameter profileAt, the others held at the ledger’s best set, and evaluated profileReps times on paired seeds (fireSenseUtils::profileCoefficients(at = )). The values may lie outside the fit’s bounds, so a profile can show whether a bound, such as the fuel coefficients’ 0, holds a fit away from a better value. The objective is the fit’s, on a cluster built as the fit’s; the run stops when the ledger row was fitted on other parameters, another covariate centre or another power-law gamma. sim$spreadFitProfile is also written to spreadFitProfile_<.runName><fitFileSuffix>.csv in the module’s output folder. The emulator’s cluster code is shared with it (withObjectiveCluster()), and the fit’s runDEoptim() arguments are built by one function, spreadFitDEArgs(); the fit and the emulator are unchanged. Needs fireSenseUtils with profileCoefficients(at = ) and phaseEvents(profiles = ) (PredictiveEcology/fireSenseUtils PR “profileCoefficients at”).
A fit that simulated its members (simulateMembers > 0) stores its in-sample fire-size validation in its ledger row, column inSampleSizes_spread (fireSenseUtils::spreadFitInSampleSizesTxt): a list of sizes (the one-row fireSenseUtils::scoreFireSizes(), as sim$spreadFitSizes) and byYear (fireSenseUtils::scoreFireSizesByYear(): observed area burned per year, simulated median and 2.5-97.5% range), so a report can read it from the ledger. A cross-validation fold and a fit without the diagnostics write no column; a ledger without it reads and predicts as before. Needs fireSenseUtils >= 0.2.3.9171 (PredictiveEcology/fireSenseUtils, the PR that adds scoreFireSizesByYear()).
A null fit, the spread formula ~ 1 (set by fireSense_dataPrepFit’s spreadCovariates = "none"), is fitted with an intercept and no covariate: the bounds, the covariate centre and the ledger row already allowed it, and the objective’s gates now do (fireSenseUtils, Depends-on there). spreadFitValidationFigures() draws nothing for it, since there is no covariate to bin or to draw a curve for. Needs fireSenseUtils with spreadHasCovariates().
Fixed: the emulator’s trust rounds (emulatorTrustStep(), R/emulator.R) halved the box after every successful round, even when the best point lay at the box’s edge, so a search still moving toward a minimum outside the box shrank it below trustMinWidth and stopped 7-15 noise SDs above the minimum. A round whose best point is at the box’s edge (emulatorAtBoxEdge()) now keeps its scale. Emulator-started fits take a different search path, so their emulator cache entries change and they refit under a new fitFileSuffix; fits already in a ledger are unaffected.
New parameter skipUnusedFitPrep (default FALSE: nothing changes). TRUE leaves out spreadFitPrepare in a job that only predicts from the ledger’s fit (it does not fit, validate, profile or hold out a fold: fireSenseUtils::fitDataNeeded(), shared with fireSense_dataPrepFit), which made covariates nothing in that job reads: about 2.5 minutes of every hindcast year-job. Prediction takes covMinMax_spread, covCentre_spread and climateRef_spread from the ledger row; a row written before covMinMax_spread still needs sim$covMinMax_spread, so do not set it with such a ledger. The same parameter of fireSense_dataPrepFit (.globals = list(skipUnusedFitPrep = TRUE)); init stops if the modules differ on it or on doFit. It is not in the cache keys. Needs fireSenseUtils >= 0.2.3.9167 (the version assumed for the PR that adds fitDataNeeded()).
spreadLink also takes "powerLawSmooth" and "richards", links with a lower asymptote (lowerAsymptote, default fireSenseUtils::spreadProbFloor, from fireSenseUtils::spreadLowerAsymptoteMin (0.001, never 0: a fire under its minSize would retry for about 1 / p generations) to that) that never make a cell unburnable ("powerLaw" lets p fall to 0 for a low linear predictor, so escaped fires stop early in low-spread years; it is unchanged). "powerLawSmooth" is calibrated like "powerLaw"; "richards" (with richardsNu, default 0.5; 0 is Gompertz) is never calibrated, so it fits an ELF that has none, and writes no powerLawGamma. The ledger row records the link, lowerAsymptote_spread and ("richards") richardsNu_spread; the gates use lowerAsymptote as their lower bound. wholeLandscapeSpread works with every one of these links. Needs fireSenseUtils and SpaDES.tools with the links (PredictiveEcology/fireSenseUtils, PredictiveEcology/SpaDES.tools PRs “powerLawSmooth and richards spread links”).
Fixed: after a wholeLandscapeSpread fit, the validation figures (spreadFitValidationFigures()) and the cross-validation’s held-out simulations (crossValidate, heldOutFold) simulated the fires as buffered ones, because spreadObjFunArgs() (R/fitSpread.R) did not give fireSenseUtils wholeLandscape; and with a fitted fireSpreadSD the figures stopped with “fireSpreadSD (a per-fire random effect) needs wholeLandscape = TRUE” after the fit had been written to the ledger. spreadObjFunArgs() now adds wholeLandscape = TRUE and the fit’s penaliseRunaways (FALSE, as the objective needs) for a whole-landscape fit only, so a buffered fit’s arguments and cache keys are unchanged. Depends-on: PredictiveEcology/fireSenseUtils#225 (spreadFitValidationData() takes wholeLandscape and fitFireSpreadSD).
The escape definition of a run is fireSenseUtils::escapeDefinitionOf() and the emulator’s random-effect arguments are fireSenseUtils::spreadRandomEffectArgs() (PredictiveEcology/fireSenseUtils#222), instead of local copies; a fit with escapeSizeHa = NA still records NA. Needs fireSenseUtils with that PR.
New parameter fireSpreadSDBounds (default c(0, 10), NA turns it off): the bounds of fireSpreadSD, the sd of a per-fire random effect on spread, which goes just before yearSpreadSD in lower and upper (randomEffectBounds(), estimateSpreadParams()). Only wholeLandscapeSpread = TRUE fits it; otherwise it is left out of the bounds with a message, and the fit, its cache key and the emulator’s are what they were. The emulator tells the objective fitFireSpreadSD and its starting population has the extra column. The ledger row holds fireSpreadSD with the other fitted values, and the escape definition (escapeSizeHa, fireCauses, fireSenseUtils::escapeDefinition()); a ledger row written before this has neither column. escapeSizeHa defaults to fireSenseUtils::fireSenseEscapeSizeHa (still 50), and the new fireCauses to fireSenseUtils::fireSenseFireCauses; both are checked against the other modules’ with paramCheckOtherMods(ifSetButDifferent = "error"). Depends-on: PredictiveEcology/fireSenseUtils#221; fireSense_spreadPredict (branch per-fire-sd) must merge first, since it drops fireSpreadSD from the fitted parameters it predicts with.
The emulator (initialPopMethod = "emulator") fits its Gaussian process to at most gpMaxPoints (new emulatorControl element, default 400) evaluations (emulatorTrainRows(), R/emulator.R): the best distinct points by mean value, with their replicates, fill half and the rest are the points farthest from those kept. It refitted the GP to every evaluation on the master between batches (fitEmulatorGP()) while the workers waited, and a fit grew from 3 s to 96 s as the evaluations reached 1,064 (14.6 of ELF 6.6.2’s 51 min). Replaying 6.6.2’s 23 batches, the GP fits take 3.4 min instead of ~15, the longest 21 s; the GP’s best mean and the starting population’s best point are the same, and the population’s median value is 779.6 against 773.9. Batch choice and the starting population still use every evaluation. The emulator’s path and starting population change, so the emulator’s cache key and every emulator-started fit’s key change: new fits differ and refit under a new fitFileSuffix as usual. gpMaxPoints = Inf gives the earlier behaviour.
New parameter wholeLandscapeSpread (default FALSE: same arguments to fireSenseUtils, same cache keys). TRUE spreads every fire of the fit on all pixels of its covariate tables, with no buffer edge, so no fire is cut and a fit is no longer rewarded for truncated fires; it is meant for whole-ELF tables from fireSense_dataPrepFit (wholeLandscapeSpreadCovariates). fireSenseUtils computes the spread probability only on the cells a fire reaches, so an evaluation costs about what a buffered one does. It goes to fireSenseUtils as wholeLandscape on every path that evaluates the objective (the fit, the folds of crossValidate, the emulator, the debug event). Needs spreadLink = "powerLaw" and penaliseRunaways = FALSE. It replaces resimulateCutFires and cutMaxTries (#117), which never ran, and their separate whole-ELF inputs. fireSenseUtils >= 0.2.3.9156 (check after PredictiveEcology/fireSenseUtils#219 merges). Refits need a new fitFileSuffix.
Fixed: the library path (libPathDEoptim, default .libPaths()[1]) was in the DEoptim fit’s Cache() key (libPath was missing from omitArgs in fitSpread()), so a new library folder after an install made every fit miss its saved generations. libPath is omitted from the key, and libPathDEoptim now defaults to NA, meaning .libPaths(), all of it, in order, when the fit runs (clusters decides what to ship); the emulator no longer cuts the path to its first library. Fits cached with the old key miss once.
Fixed: a fit started from the emulator (initialPopMethod = "emulator") always stopped on window = 200, minGenerations = 200, whatever the run’s rule: convergenceOf() (R/emulator.R) put those two into the explicit convergence list, which clusters::deoptimConvergence() ranks above the clusters.deoptimConvergenceWindow and clusters.deoptimMinGenerations options. Removed with convergenceOf(): a seeded fit resolves its rule as any other (the convergence parameter, then the options, then clusters’ defaults, 300/350), so it runs longer than before and its cache key changes. The seeded default was added with the emulator start (e2357d9, first 100, then 200) on the thought that a fit starting near the optimum needs fewer generations.
Breaking: the threshold calibration is removed with the "SNLL_FS" test it served (Depends-on: PredictiveEcology/fireSenseUtils#209). DEoptimTests defaults to "crps" (was c("adTest", "SNLL_FS")); "SNLL_FS" in it stops the fit, and fireSenseUtils’ objective takes no thresh. Removed: the estimateThreshold event (the fit starts at once; a held-out fold no longer calibrates), the parameters firstBlockThresh, iterThresh and thresholdMargin, estimateFirstBlockThreshold(), pickThreshold(), passingPars(), usableTrials(), trialFirstBlock(), stopIfTrialsErrored(), noEarlyStopThreshold() and withPassingFirst(). fitSpread() loses its thresh and passingPars arguments; runSpreadWithoutDEoptim() (the debug event) only evaluates the objective, on nSets (default 1; it was iterThresh, 96) random parameter sets. A "crps" fit used to run the calibration for hours and discard its result (it cannot calibrate without the early stop). The fit’s start is DEoptim’s own, or initialpop; the gate-passing start of the retry is unchanged. The fit’s objective changed (fireSenseUtils’ code), so every cached spread fit is refit.
Over several ELFs (.ELFind of a studyAreaLarge, from fireSense_ELFs), doFit needs a stored fit for each (only the first was checked), and a fit of several stops before anything runs: a fit is of one ELF.
doFit defaults to FALSE (was NA): a run never fits unless asked. With no ledger row for the ELF (under fitFileSuffix), init stops before any DEoptim call, with an error naming the ELF and the ledger suffix and saying how to fit (doFit = NA: fit when there is no stored fit; TRUE: always fit). A user who adds fireSense to a project only to predict can no longer start a fit by accident. The deprecated refitExisting and stopIfNoPreRunFit override the default doFit = FALSE, as they did NA (needs fireSenseUtils with the matching resolveDoFit()).
Fixed: a fit followed by prediction in the same run stopped with “sppEquivs has no entry for ELF(s)” when the ELF had no ledger row before the fit but its neighbours did (ELF 4.2.1, GPSC). The run event now rebuilds sppEquivs, sppColorVects, sppNameVectors, nonForestedLCCGroupsList and missingLCCgroupList from the ledger it writes (fireSenseUtils::spreadFitLedgerInputs()), and declares them as outputs, so a cached run event restores them. New parameters sppEquivCol and fuelClassCol, the same as fireSense_dataPrepFit’s.
New parameter powerLawShape (default 1, today’s link), the fixed curvature exponent of spreadLink = "powerLaw": p = p_c - (p_c - lowerSpreadProb) * exp(-sign(x) * abs(x / gamma)^shape) (fireSenseUtils::powerLawLink()). A shape above 1 gives a lower p for a moderate x and a p closer to p_c for a large x. It goes wherever powerLawGamma does (fit, threshold calibration, gates, held-out simulation) and, at 1, is left out of the cache keys, so existing fits are found. A powerLaw ledger row gets the column powerLawShape_spread (fireSenseUtils::spreadFitPowerLawShapeTxt) next to powerLawGamma_spread; rows without it are shape 1. Needs fireSenseUtils >= 0.2.3.9137.
forkBudget() ignores the node’s busy threads (clusters::numActiveThreads()) and load (fireSenseUtils::nThreads()) inside a Slurm job given part of a node (parallelly::availableCores() below parallel::detectCores()), as clusters:::.limitToJob() does. Other jobs’ threads run on CPUs the job’s cgroup keeps away from it: a 42-CPU job on a shared 64-CPU node logged “Using 3 cores” for the threshold calibration. Whole-node jobs and runs outside Slurm are unchanged.
New parameters crpsWeights and gateRefusal, passed to fireSenseUtils::runDEoptim() (and to the threshold calibration), and DEoptimTests = "crps" for fireSenseUtils’ CRPS objective (per-fire CRPS on log size, adTest, areaDist, CRPS of the log total area and of the 10 largest fires; no annual-area term). crpsWeights is a named list of the terms’ multipliers (default NULL: fireSenseUtils::crpsWeightsDefault()); gateRefusal = "simulate" scores a year that fails the spread-probability gates instead of refusing it. objfunFireReps = 100L sets the objective’s replicates. Defaults are unchanged and add nothing to the fit’s or the threshold’s cache key. Under "crps" the threshold calibration has no first-block value and warns; the fit runs without an early stop. The fireSenseUtils floor in reqdPkgs will be raised after fireSenseUtils’ PR is merged and bumped.
The threshold calibration’s fork count (forkBudget()) uses parallelly::availableCores() instead of parallel::detectCores(), and the memory a Slurm job was given (clusters:::.slurmAllocation(), clusters >= 0.0.87) when it is below the host’s free memory. A job given part of a node (e.g. 41 of 64 CPUs) forked as many children as half the node’s cores and Slurm killed it at its memory limit. parallelly added to reqdPkgs.
Each fire’s target size (lociList) is its burned area on burnable pixels (column fireSenseUtils::burnableHaTxt of spreadFirePoints, from fireSense_dataPrepFit), not its polygon area (POLY_HA): the fit’s landscape has burnable pixels only. On ELF 10.3.1_2 the median fit fire was 6% burnable. Only fires with buffers in fireBufferedListDT are fitted (fireSense_dataPrepFit leaves out fires with too little burnable area). New internal spreadFitLoci(). Every spread fit changes: refit with a new fitFileSuffix. Floor fireSenseUtils 0.2.3.9128.
initialPopMethod = "emulator" searches the full bounds instead of a box around the threshold calibration’s passing sets. That box (emulatorBox(), removed) was nearly the bounds, searched on a linear scale, so the region near the sign constraints where fits end (youngAge -1.5, fuel coefficients 1-30 against bounds of -50 and 100) was almost never sampled: the campaign’s 6.6.1 start sat at ~1,700 for 864 evaluations, where the known optimum scores ~940. Now (R/emulator.R): parameters with one bound at 0 and the other at least logSpanMin (20) from it are searched on a signed log1p scale (emulatorSpace(); the fuel coefficients, youngAge and CMD with the current bounds), the others linearly; DEoptim keeps lower/upper. After the global phase, the local phase is trust-region rounds (emulatorTrustBox(), emulatorTrustStep()): each round’s region is the box around the best 10% of all points so far by GP mean, widened by half its width each side and scaled; a round that improves the GP’s best mean by more than the objective’s noise SD (pooled from replicates near the best, emulatorNoiseSD()) halves the scale, a failure grows it by 1.25, and two failures in a row, a region narrower than trustMinWidth, or maxEvals stop the search. The starting population is NP evaluated points taken best first from the best 20% at least popMinDist GP lengthscales apart, the distance halved until NP are taken (emulatorSpreadPopulation()), so separate good regions are each represented. The passing sets no longer go to the emulator. New emulatorControl elements: logSpanMin, trustRoundBatches, localTopFrac, localWiden, trustTolSD, trustShrink, trustExpand, trustSuccessTol, trustFailureTol, trustMinWidth, popPoolFrac, popMinDist; removed: boxWiden, boxMinWidthFrac, trustTop, localWindow. A seeded fit’s convergence defaults to window = 200, minGenerations = 200 (was 100 each). The emulator’s cache key changes (its code is in it), so emulator-started fits search again and refit; fits started with "calibration" do not change.
libPathDEoptim and objFunCoresInternal are no longer part of the module’s cache keys (cacheKey = FALSE, as for cores). libPathDEoptim defaults to .libPaths()[1], so the estimateThreshold event’s cache entry made on one machine never loaded on another (the one differing digest in 979) and each machine redid the threshold calibration. Existing estimateThreshold entries miss once; the calibration’s own cache does not key on the library path, so locally the rerun is cheap.
yearSpreadSDBounds defaults to c(0, 10) (was c(0, 5)). Fitted yearSpreadSD reached 4.8-5.0 in ELFs 6.6.1, 6.1.3 and 6.2.3, so the bound was binding. The fit’s bounds change, so every spread fit refits.
New parameter initialPopMethod: "calibration" (default, the start as before) or "emulator", which starts DEoptim from the nCoresNeeded best points of a Gaussian-process emulator search of the fit’s own objective (ported from the 2026-10-25/26 prototype: seeded, ELF 6.3.1 reached in 16 generations the population median its unseeded fit needed 249 for). The search (R/emulator.R) knows only lower/upper and the objective arguments fitSpread() gives runDEoptim() (emulatorObjectiveArgs(), with thresh = Inf): a maximin Latin-hypercube design in a box around the threshold calibration’s passing sets (or lower/upper without them), then batches chosen by a noisy GP (hetGP::mleHetGP(), Matern 5/2, on a capped log scale; expected improvement, exploration and replicates), a global then a trust-region phase, each until the GP’s best mean stops improving, within 1,600 evaluations by default (new parameter emulatorControl, emulatorDefaults()). The evaluations run on a cluster from clusters::clusterSetup() on the fit’s cores, released when the search ends; the result is cached on the objective’s inputs, bodies and the settings. A seeded fit’s convergence defaults to window = 100, minGenerations = 100 (a convergence parameter still wins). With more than emulatorMaxParams (18) parameters, or with initialpop set, the start is as with "calibration". runDEoptim()’s arguments are now built once as a list (Cache(do.call(runDEoptim, ...))); the fit’s cache key is unchanged. hetGP and lhs are added to reqdPkgs.
Fixed: the initialpop parameter never reached DEoptim. With it set, the calibration’s passing sets were cleared and no starting population was passed (fireSenseUtils::runDEoptim() ignores its own initialpop argument), so DEoptim drew its own start. New internal startPopulation(): initialpop when given (columns checked against names(lower)), else the passing sets then uniform draws, else NULL. Fits that set initialpop change; others do not.
A fit starts from the parameter sets the threshold calibration found to pass the threshold, instead of a blind draw. Calibration evaluates ~96 gate-passing sets, but only a few percent score under the threshold with weighted fits (ELF 6.6.1, weighted = "log": 6), so a 40-member start had none twice and clusters stopped the fit after generation 1. runSpreadWithoutDEoptim() now returns list(thresh, passingPars) (passingPars(): usable trials at or below the threshold, columns in names(lower)); the estimateThreshold event keeps mod$thresh as the same number and stores the sets in mod$thresholdPassingPars; fitSpread() puts them first in DEoptim’s initialpop (then uniform draws), on the first attempt and on the deoptimNoFeasibleMember retry (withPassingFirst()), and stops if one is outside lower/upper. The threshold value is unchanged. Without passing sets, a bare-number calibration cached earlier, a user initialpop, or in the cross-validation folds (their first block is other years), the start is as before. Cache keys: the calibration’s key changes (it reruns once, with the same threshold); a fit’s key changes only when there are passing sets (its DEoptimControl carries initialpop), so fits in progress that have passing sets restart; fits with none keep their key.
DEoptimTests accepts "pitAD", the rank-based Anderson-Darling term of fireSenseUtils (each fitted fire’s observed size ranked among its replicates, scored against uniform; it does not depend on the fit buffers), beside or instead of "adTest". The fit’s and threshold’s cache keys include pitMidRank() and adUniform(). The default is unchanged.
The spread fit’s objective is the one from before fireSenseUtils#183 again (hindcasts: its per-fire kernel log score did not reduce over-burn, and size weighting made it worse). Restored module defaults: DEoptimTests = c("adTest", "SNLL_FS"), yearAreaWeight = "auto", areaDistWeight = "auto", and sizeLik, sizeLikDf, adWeight are live parameters again (sizeLik = "kernel" selects the kernel log score). Kept: the per-fire early-stop threshold (firstBlockThresh, estimateFirstBlockThreshold(), trialFirstBlock() reading firstBlockPerFire), the fork fixes, runawayBufferMultiple = NA (a cut replicate is scored at the size it reached), weighted = FALSE. objectiveBodies() (the Cache key of the fit and the threshold) now also holds sizeLikT, adStatistic, adWeightAuto, pooledFireSizes, yearAreaNLL and areaWeightedCvM. Every spread fit’s cache key changes: refit with a new fitFileSuffix. Depends-on: PredictiveEcology/fireSenseUtils#184.
The threshold self-calibration and the "powerLaw" calibration fork with one BLAS thread (localSingleThreadBLAS(); the forks inherited the parent’s 64 OpenBLAS threads, and five fits calibrating at once took the load of an 80-core host past 370), and forkBudget() is also capped by fireSenseUtils::nThreads() (host load). Results are unchanged. RhpcBLASctl is added to reqdPkgs.
The threshold calibration stops when any trial’s objective errors (stopIfTrialsErrored(), was: only when every trial errored), with the count and the first error; a bug that crashed a few parameter sets was hidden (kernelLogScore underflow: 4 of 30 trials, then every fit died in DEoptim generation 1). Trials whose process died are still tolerated unless all died.
The spread objective no longer depends on the fit buffers (fireSenseUtils >= 0.2.3.9123, Depends-on: PredictiveEcology/fireSenseUtils#183). Each fire’s observed size is scored by a kernel log score of its simulated sizes, and a replicate that reaches an open buffer edge is cut and scores nothing, instead of being scored at the size it had reached. The early-stop threshold is now per fire, not per year: SNLL_FS_thresh is renamed firstBlockThresh (numeric), estimateSNLLThresholdPostLargeFires() is estimateFirstBlockThreshold(), pickThreshold() is thresholdMargin times the best usable trial’s first-block value per fire (no ceiling(): the value is about 1-3), and trialFirstBlock() reads the objective’s firstBlockPerFire. The cross-validation folds reuse the full data’s threshold (the same cached calibration) instead of calibrating their own. Retired, since the objective no longer has the terms they set: DEoptimTests defaults to "SNLL_FS" (was c("adTest", "SNLL_FS")), yearAreaWeight and areaDistWeight to 0 (were "auto") and runawayBufferMultiple to NA (was 2), so fireSenseUtils does not warn about them; sizeLik, sizeLikDf, adWeight, runawayEdgeFrac and runawayEdgeMin are ignored; penaliseRunaways only stops a cut fire early. The fit’s and the threshold’s cache keys include the new callees (kernelLogScore(), addBufferEdge(), bufferEdge(), bufferOpen()). Every spread fit changes: refit with a new fitFileSuffix.
The "powerLaw" calibration (fireSenseUtils::calibratePowerLaw(), 400 fires per spread probability, one forked process per fire) runs only when the job fits, validates (mode) or runs a held-out fold. A job that reuses the ledger row (doFit = FALSE, or a row found), as every hindcast does, read p_c and gamma from the row but still recalibrated on its year’s flammable map: up to 96 recalibrations in a 12-ELF hindcast queue. Results are unchanged: the calibration only set the fit’s bounds and gamma.
init schedules spreadFitPrepare once, not twice at the same time, when it fits: the second run recomputed the same bounds, covariates and centre.
cores is no longer part of the module’s cache keys (defineParameter(cacheKey = FALSE)): adding a host to it re-ran every cached spreadFit event (spreadFitPrepare, estimateThreshold, run), although the fit’s and calibration’s own Cache() calls already leave it out. A cache hit keeps the current cores. Floor SpaDES.core 3.2.1.9045 (Depends-on: PredictiveEcology/SpaDES.core#503). Cached spreadFit events are missed once, because cores leaves their keys.
A fit whose DEoptim start has no member the objective accepts is started again from a population that passes the spreadProb gates. DEoptim draws its start uniformly between the bounds, which are wide on purpose (sign only); for ELF 6.6.2 (two climate terms each over 0-50, 2026-10-20) 0 of 2000 such draws passed the gates, every value was the fail value, DE could not improve on that, and the fit died at generation 10. clusters (>= 0.0.82) now stops such a fit after its first generation (deoptimNoFeasibleMember); the module catches that and runs the fit again with DEoptimControl$initialpop drawn by drawActivePars() with the same gates as the threshold calibration (spreadGates(), feasibleInitialPopulation(): the accepted sets first, uniform draws for the rest, from the ELF’s seed; at least 4 accepted or it stops with the gate counts). The first fit’s arguments are unchanged, so its cache key is too: fits in progress resume from their cached generations; only the retry is a new fit. A retry that stops again is final. Floor clusters 0.0.82 (Depends-on: PredictiveEcology/clusters#57).
yearSpreadSDBounds defaults to c(0, 5) (was c(0, 1)). With the default power-law link the year effect is on the linear predictor, and all 14 power-law fits of 2026-10-19 pressed against the old upper bound (0.85-0.99). The description no longer says the effect is on the logit for every link.
Defaults changed. spreadLink is now "powerLaw" (was "ceiling") and penaliseRunaways is FALSE (was TRUE; Eliot 2026-10-17: score simulated sizes as burned, buffer-bounded like the observed ones; the 2x-buffer runaway score shrank yearSpreadSD 3-4 times). "ceiling" and "climateOutside" remain options, with their fits, cache keys and ledger rows as they were; set them (and penaliseRunaways = TRUE) to reproduce earlier fits. With "powerLaw" the module needs the input flammableRTM (set by fireSense_dataPrepFit).
"powerLaw" calibrates itself. Once per ELF, on flammableRTM (latest vegetation year), fireSenseUtils::calibratePowerLaw() runs fires as fireSense_burn does (escape size, jumpTries, jumpMeanDist from this module’s parameters) at constant spread probabilities, and gives p_c50 (where half the fires burn at least a quarter of the largest flammable patch) and gamma (slope of log mean fire size on log(p_c50 - p)). powerLawGamma now defaults to NA: use the calibrated gamma; a number overrides gamma only. The calibration always runs, because p_c50 sets the bounds of p_c per ELF: lowerSpreadProb + 0.01 to p_c50 + new parameter powerLawPcMargin (0.005), instead of the global 0.35, so a fit no longer tries thresholds far above the ELF’s own, which only give runaway fires that are rejected (fireSenseUtils::spreadPowerLawPcBounds stays as the outer sanity limits). New parameters powerLawFires (400) and powerLawPGrid; the calibration is in a Cache() keyed on the map, its arguments and the function bodies (not cores). The ledger row records gamma, p_c50, the calibration’s R2 and the margin (fireSenseUtils::spreadFitPowerLawPc50Txt, spreadFitPowerLawR2Txt, spreadFitPowerLawPcMarginTxt). New output powerLawCalibration. Floor fireSenseUtils 0.2.3.9108 (Depends-on: PredictiveEcology/fireSenseUtils#168).
spreadLink takes a third value, "powerLaw" (new parameter powerLawGamma, default 1.9, from a percolation calibration; fixed, not fitted). The spread probability is p = p_c - (p_c - lowerSpreadProb) * exp(-x / powerLawGamma) with x the linear predictor (fireSenseUtils::powerLawLink()), p below 0 set to 0, and p_c the fitted maxAsymptote, bounded by fireSenseUtils::spreadPowerLawPcBounds (0.14 to 0.276; the covariates’ bounds are the default link’s, sign only). The year effect yearSpreadSD is added to x, not to the logit of p. The link and powerLawGamma go to the fit, the threshold calibration, the held-out simulation and the ledger row (fireSenseUtils::spreadLinkTxt, spreadFitPowerLawGammaTxt), so fireSense_spreadPredict applies the same link. An unknown spreadLink, "powerLaw" with link = "logistic3pUpper", or a powerLawGamma that is not one positive number now stops. With the default "ceiling" the fit’s arguments, cache keys and ledger row are what they were (powerLawGamma is left out of the keys unless the link is "powerLaw"); the objective bodies in the keys now include logisticAll() and powerLawLink(), so a cached fit made before this change is re-run once. estimateSpreadParams() gains maxAsymptoteBounds. Needs fireSenseUtils >= 0.2.3.9107.
New parameter spreadLink (default "ceiling", the link as it was: bit-identical fits, same cache keys, same ledger rows). "climateOutside" fits the logistic and its maxAsymptote ceiling to the non-climate covariates only and adds the climate term on the logit after it, p = plogis(qlogis(p0) + beta_clim * (climate - climateRef)), uncapped, with the year effect yearSpreadSD (eps_Y) on the same logit; where fuel put a pixel near the ceiling, climate could add almost nothing before (2026-10 hindcasts: 59-77% of pixels within 0.01 of the ceiling every year). climateRef is the mean of each climate covariate over the fit’s pixel-years, on the design scale (fireSenseUtils::spreadClimateRef(); new output climateRef_spread), found once in spreadFitPrepare and given to the fit, the re-score and profile, the threshold calibration (objective and gates), the held-out simulation and the validation figures; the ledger row records it with the link (fireSenseUtils::spreadFitClimateRefTxt, spreadLinkTxt), so fireSense_spreadPredict applies the same link. The objective’s gates and saturation summary then look at p0, the spread probability at the reference climate. The spread link (fireSenseUtils::spreadProbFromCovs()) is in the fit’s and the threshold’s cache keys. fireSenseUtils floor 0.2.3.9106 (Depends-on: PredictiveEcology/fireSenseUtils#165).
New parameter fitFileSuffix (default ""), the same in fireSense_ignitionFit, fireSense_dataPrepFit and fireSense_ELFs (checked with paramCheckOtherMods()): with spreadFitFilename = "latest" the fit is written to fireSenseUtils::spreadFitFilenameFor(fireYears, fitFileSuffix), so a test run (.globals = list(fitFileSuffix = "_boundfix_rep81")) never writes to the production ledger file. "" is unchanged. Needs fireSenseUtils (>= 0.2.3.9104).
New parameter convergence (default NULL): the DEoptim early-stop rule, a list with any of window, minGenerations, se, sdChange. It is resolved once to the full list (the parameter, else the clusters.deoptim* options, else clusters’ defaults) and passed to runDEoptim() inside the fit’s Cache() call, so changing the parameter or the options changes the fit’s cache key; clusters keeps it out of each generation’s key, so a fit that stopped early continues from its cached generations under a stricter rule. Fits cached before this re-key once. Floors fireSenseUtils 0.2.3.9102 and clusters 0.0.80 (Depends-on: PredictiveEcology/fireSenseUtils#162, PredictiveEcology/clusters#55).
The fit’s and the threshold calibration’s cache keys now include spreadProbFromIntegerCovs(), spreadProbCovsOfYear() and dataYearBefore(), so a change in which vegetation table a fire year reads is a cache miss and a threshold cached as NA under the old rule is not reused. A calibration whose every trial errored now stops with the first trial’s error (stopIfAllTrialsErrored()) instead of returning NA (then Inf) to be cached. fireSenseUtils floor 0.2.3.9100, whose objective reads the table of the latest data year strictly before the fire year, as fireSense_dataPrepFit builds them (Depends-on: PredictiveEcology/fireSenseUtils#159). Spread-fit input tables must be named by data year.
The lower bound of maxAsymptote is now fireSenseUtils::spreadProbFloor (0.13), not 0.25. With 8 neighbours, SpaDES.tools::spreadCpp percolates (fires grow until they fill the landscape) at a spread probability of about 0.245-0.25 (uniform 1500 x 1500 landscape, 200 fires: 0.245 largest fire 77k pixels; 0.25 median 57k pixels and 47% of fires over 100k; 0.255 fills the landscape), so the old bound forced every fit to near-critical spread. All 125 spread parameter sets in the 25-ELF hindcast sat at 0.250-0.268, 39 of them within 0.001 of the bound, and the hindcast fires were 10-100 times the largest observed. The upper bound (spreadProbCeiling) is unchanged. Fits change and cached fits re-key; existing fits must be refitted to benefit.
New parameter runawayBufferMultiple (default 2): with penaliseRunaways, a runaway counts in the objective’s size-based terms as this multiple of its own fire’s buffer size, in the fit, the re-score and the threshold calibration. A full-landscape hindcast of ELF 5.4 showed fits that matched the observed area inside the buffers ran away on the whole landscape (fires of 3-6 Mha). NA keeps the old scoring (the size it burned) and the old cache keys; the default changes fits and thresholds, so they re-key. Needs fireSenseUtils (>= 0.2.3.9085), the first version with it (PredictiveEcology/fireSenseUtils#133); the module floor is higher.
New parameter doFit replaces refitExisting and stopIfNoPreRunFit. NA (default): use the ledger’s fit if it has one for the polygon, otherwise fit. TRUE: always fit, replacing a ledger fit (was refitExisting = TRUE). FALSE: never fit, and stop with an error naming the polygon if the ledger has none (was stopIfNoPreRunFit = TRUE). A run that sets none of these now fits when the ledger has no fit, where it used to stop (the default stopIfNoPreRunFit = TRUE). The two old parameters still work, default to NA, and print a deprecation message naming doFit when set. The decision is made by fireSenseUtils::resolveDoFit() and mustFit(); fireSenseUtils floor 0.2.3.9098, the first version with them.
doObjFunAssertions defaults to getOption("fireSenseUtils.assertions", FALSE) (was TRUE; the diagnostics are slow). The threshold calibration, runSpreadWithoutDEoptim(), takes the parameter’s value (its own default, getOption("fireSenseUtils.assertions", TRUE), is gone), so the one option turns the diagnostics on for the fit and the calibration.
spreadFitGoogleDriveFolder defaults to fireSenseUtils::spreadFitLedgerFolder(), which follows options(fireSenseUtils.spreadFitLedgerFolder = ). nCoresNeeded = NULL now means fireSenseUtils::deoptimPopulationSize() (30 for 4-7 parameters, 40 for 8-12, 50 for 13-15) instead of 10 per parameter; current ledgers have 10-12 parameters, so 40 as before when passed explicitly. fireSenseUtils floor raised to 0.2.3.9097, the first version with spreadFitLedgerFolder() and deoptimPopulationSize(). clusters floor raised to 0.0.78 (clusters#53), whose defaults projects now rely on.
SpaDES.core is now in reqdPkgs (scheduleEvent(), P(), Plots() are used).
The run name is now only the parameter .runName (as in Biomass_core); the input object .runName is no longer read, so a pipeline that supplied it as an object must pass it as a parameter (params$.globals works). Before, a project that set the parameter got a NULL name: progress files were DEoptimProgress_.csv and clusters recorded no name for worker speed or memory. The name is part of a fit’s cache key (runName argument and .cacheExtra), so a fit cached under the empty name is refitted once, unless the ledger already holds it.
Every DEoptim fit (the main fit and each cross-validation fold) writes its per-generation progress to DEoptimProgress_<runName>.csv in the module’s output folder (file.path(outputPath(sim), currentModule(sim))), with a FINISHED row at the end. No setting is needed, and the path is not in the fit’s cache key. Needs fireSenseUtils with runDEoptim(progressFile =) (PredictiveEcology/fireSenseUtils, branch feat/deoptim-progress-file; the floor is the version that merges it).
This release makes fire-spread fits more reliable and easier to check. The fitting search now uses settings chosen from a comparison of options, stops once it has settled, and fixes parameters that could not be estimated well, so repeated fits agree more closely. Fires that would run away are scored by whether they reach the edge of their own area rather than being cut off at a fixed size, and several errors in how the fitting threshold was calibrated, which could make a fit depend on luck or fail outright, are fixed. Fuel biomass is fitted on its natural scale, with its own bounds, and each fit records how much spread varies from year to year.
Each fit can now be checked against fire years it did not see, and produces figures and diagnostics showing which inputs the data can actually support. Finished fits are saved to a shared record by study area so later runs reuse them, and cached results are refreshed when the scoring code changes. The module is renamed fireSense_spreadFit (lower-case “s”), so projects need to update the name they use for it, and several settings were renamed or now have new defaults.
Requires reproducible (>= 3.2.1.9067): before it, CacheGeo() matched this module’s le = le to its ledger argument and every ledger write stopped with “area is required” (PredictiveEcology/reproducible#636).
Default DEoptim bounds: fuel biomass coefficients (dom_agb_*, sec_agb_*, treedWetland_agb) now have a lower bound of 0 (upper still upperAndLowerValFuel), as drought terms do. With the intercept and centred covariates, fits put the intercept near the spread-probability ceiling and gave fuel biomass negative coefficients, so low-biomass (recently burned) stands were the most flammable. That positive feedback produced runaway fires 3-6 times the observed area in NRV runs (ELFs 5.4 and 14.3). With fuel >= 0, more fuel can only raise spread probability and the intercept must come down. Fits change and cached fits re-key.
studyAreaWithSpreadParams is now declared as an expectsInput (it stays a createsOutput). init reads the ledger rows fireSense_dataPrepFit sets, but as an output only it was not in the event’s cache key, so a cache hit restored the rows from an older job (ELF 14.3: 720 iterations, no intercept) over the current ones and fireSense_spreadPredict failed on missing covariates.
The fit’s and the threshold calibration’s cache keys include the spread objective’s bodies (objectiveBodies()), so a change in how fireSenseUtils scores a fit is a cache miss. Needed for fireSenseUtils’ change to runaway censoring (likelihood only): the earlier fits under-burned held-out years and must not be served from the cache. Needs fireSenseUtils >= 0.2.3.9079.
covFixedRange defaults to fireSenseUtils::climateCovRanges, the one table of climate ranges (values unchanged, 0-100, and provisional), and a climate covariate with no entry stops the fit, naming it: there is no fallback to the data’s range, so covFixedRange = list() now stops. youngAge, the nfLCC_* groups and the treedWetland indicator are always c(0, 1) (fireSenseUtils::spreadIndicatorRanges()), so a constant one no longer rescales by 0 / 0; deriveCovMinMax() stops, naming it, on any covariate left with max <= min. maxFireSpread defaults to, and the upper bound of maxAsymptote is, fireSenseUtils::spreadProbCeiling (0.276; maxFireSpread was 0.28). Docs: maxAsymptote is the ceiling in a typical year; the year random effect acts on the logit after the link, so a year’s p can pass it. Fits change and cached fits re-key. Needs the fireSenseUtils change in PredictiveEcology/fireSenseUtils (floor to be set once it has a version).~ 1 + ..., from fireSense_dataPrepFit’s spreadIntercept) gets default bounds +/- upperAndLowerVal for fireSenseUtils::spreadInterceptTxt, first among the covariate coefficients. The mean of each rescaled covariate over the data the objective uses (fireSenseUtils::spreadCovCentre()) is found once in spreadFitPrepare, kept as sim$covCentre_spread, passed as covCentre to runDEoptim(), the threshold calibration and the held-out simulation, and stored in the ledger row (fireSenseUtils::spreadFitCovCentreTxt) so fireSense_spreadPredict centres alike. Without an intercept covCentre_spread is NULL, the ledger row has no such column, and covCentre is in omitArgs of the fit and threshold Cache() calls, so they keep their keys apart from the code they digest. A held-out fold is centred at the full data’s means. Needs fireSenseUtils >= 0.2.3.9083 (PredictiveEcology/fireSenseUtils#131).inflectionPoint1 (the spread link’s Richards exponent) is fixed at 1, not fitted, as hillSlope1 already is. In the 2026-10-04 fits its best values were bimodal (11 of 29 at the lower bound 0.1, 11 at 2-4), it spanned 0.1-3.9 inside a final population while the objective hardly changed, and the covariate coefficients explained a median 50% of its variance. estimateSpreadParams() no longer puts it in the default bounds, so upperTail1 is now the 2nd parameter; a supplied upper/lower naming inflectionPoint1 (or hillSlope1) is an error. addHillSlope1ToLedger() is now addFixedParsToLedger() and restores hillSlope1 = 1 and inflectionPoint1 = 1 (fireSenseUtils::fixedLogisticPars) after maxAsymptote, so ledger rows keep the full logistic parameter set and fireSense_spreadPredict is unchanged; an old row keeps predicting with its own fitted inflectionPoint1. Needs fireSenseUtils >= 0.2.3.9082 (PredictiveEcology/fireSenseUtils#130). This changes the DEoptim cache key; fits made with inflectionPoint1 need redoing.
The parameter rep is renamed .rep, a SpaDES-aware parameter like .studyAreaName: SpaDES.project::setupProject() sets .globals$.rep from the experiment’s .rep (PredictiveEcology/SpaDES.project#190), as fireSense_spreadPredict uses it (PredictiveEcology/fireSense_spreadPredict#24). The DEoptim cache names use its value, as before, so cached generations are still found; the event cache key changes once.
New parameters runawayEdgeFrac (fireSenseUtils::fireSenseRunawayEdgeFrac, 0.01) and runawayEdgeMin (fireSenseUtils::fireSenseRunawayEdgeMin, 3L), passed to fireSenseUtils::runDEoptim(): a simulated fire is a runaway only when it burns at least max(runawayEdgeMin, ceiling(runawayEdgeFrac * ring size)) pixels of its buffer’s edge ring, not one. Both are also passed to the threshold calibration, and are in omitArgs of the DEoptim and calibration Cache() calls: the rule only changes how quickly DEoptim moves away from an unlucky draw, so fits cached under the 1-cell rule stay valid. Needs fireSenseUtils >= 0.2.3.9077.
Fixed: threshold calibration trials were uniform draws over the wide bounds, and most saturate the logistic, which the objective refuses (“Too burny a landscape”, “Not spread out enough”); a fold with no usable trial (ELF 14.3 fold 1: 0 of 96) got no threshold and no early stop. Only about 5% of such draws pass those gates for 14.3 fold 1 (103 of 2000). runSpreadWithoutDEoptim() now rejection-samples: it keeps the draws that pass fireSenseUtils::spreadProbGates() on the first block of years (no fire simulation, the same gate code as the objective) until iterThresh are kept or maxDrawsPerTrial (new argument, default 100, a constant not a module parameter) x iterThresh have been drawn, logs “accepted A of D draws”, and runs the accepted ones as before; with none accepted the threshold is NA (Inf, no early stop). The calibration’s cache key includes drawActivePars(), spreadProbGates() and spreadProbGateTest(). This changes the DEoptim cache key. Needs a fireSenseUtils with spreadProbGates() (the PR on fireSenseUtils); the reqdPkgs floor is to be set once that merges.
Fixed: the SNLL threshold was calibrated by luck. runSpreadWithoutDEoptim() paired each of the iterThresh random parameter sets with an independent random threshold and kept the smallest threshold of the trials that passed it, so the result had no relation to the trials’ own SNLLs (ELF 6.2.1 fold 1: non-saturated trials scored 201, 212, 226, but the paired thresholds were 17, 209, 144 and none passed; 14.3 fold 1: 533 and 541 against a largest possible threshold of 381). The trials now run with no early stop, and the threshold is thresholdMargin (new parameter, default 2) times the best trial’s first-block average annual SNLL, the unit the objective compares thresh with. Trials that saturate spreadProb (“Too burny”, “Not spread out enough”) are not usable; with none usable the threshold is Inf. pickThreshold() is rewritten to this rule; each trial’s value and bailed flag are read from the firstBlockSNLL and bailed fields of fireSenseUtils::.objfunSpreadFit(returnTerms = TRUE) (needs the fireSenseUtils with #122), not parsed from its printed output; and the calibration’s cache key now includes its code. This changes the DEoptim cache key.
Fixed: when every threshold-calibration trial failed, pickThreshold() returned NA and the fit used it: every DEoptim cluster node died with “missing value where TRUE/FALSE needed” (ELF 6.2.1, heldOutFold 1). estimateSNLLThresholdPostLargeFires() now turns NA (also a cached one) into Inf, i.e. no early stop, with a message; fitSpread() stops if thresh is NA.
penaliseCapHits is renamed penaliseRunaways (default TRUE): fireSenseUtils no longer caps a simulated fire at a size, and a fire that burns any pixel of the outer edge of its own buffer is the runaway that is scored as at least that big. Passed to fireSenseUtils::runDEoptim() and to the threshold calibration. Needs the fireSenseUtils release with PredictiveEcology/fireSenseUtils#122; the reqdPkgs floor is to be set once that merges. The threshold calibration must use this objective, because the first-block SNLL has a different scale without the cap. This changes the DEoptim cache key.
The held-out object of heldOutFold (spreadFitHeldOut_<run>_fold<k>.rds) now also holds fit, the fold’s parameters as a one-row ledger sf object (all simulateMembers members, built by the same spreadFitLedgerRow() as the run event’s row), plus formula and link, so fireSense_spreadPredict can predict with the fold’s fit.
Fixed: a held-out fold’s fit (crossValidate, heldOutFold) used the SNLL threshold calibrated on all years. The threshold bounds the SNLL of the two largest fire years, and a fold’s two largest years are not the full data’s, so for ELFs 4.3 (fold 2) and 5.2.1 (fold 1) no parameter set ever passed it: every evaluation returned the fail value 1e6 for 5000 generations. Each fold now calibrates its own threshold on the years it fits (estimateSNLLThresholdPostLargeFires(sim, covs)), unless SNLL_FS_thresh is set. This changes the DEoptim cache key of fold fits.
fitSpread() now stops when every member of the final DEoptim population has the fail value. Before, such a fit went on to score or save parameters that were random draws.
dplyr, sf, withr and reproducible, which the module calls (Cache, CacheGeo, asPath) but did not list. Version 1.1.1.fireSense_SpreadFit to fireSense_spreadFit (module naming convention <model>_<camelCaseComponent>); projects must rename the module and its params key. Version 1.1.0.fitSpread() no longer calls termsInDEoptim(), which printed “logit1, logit2, …” for maxAsymptote, inflectionPoint1 and the other non-formula parameters. fireSenseUtils::runDEoptim() now prints the real names from names(lower). Requires fireSenseUtils@development (>= 0.2.3.9066). Version 1.0.6.9024..plotInterval (default 25): DEoptim generations between the DEoptim progress figures, passed to fireSenseUtils::runDEoptim() as plotEvery; the final figures are always drawn. Drawing them after every generation took 8.3 s of each 53 s generation (16% of a fit’s wall time) with every worker idle. It is left out of the runDEoptim() cache key, so changing it does not refit. Needs fireSenseUtils >= 0.2.3.9064 and clusters >= 0.0.52 (now from its development branch).run) and for each held-out fold (crossValidate, heldOutFold), two figures compare the fit with its data, through Plots() under figurePath(sim), when .plots asks for them (default NULL: none, and nothing extra is simulated). spreadFitObservedVsSimulated_<run> shows, per covariate, the share of pixel-years that burned against the share that burned in simulations from the best parameter set (fireSenseUtils::plotSpreadFitValidation()); the fold’s figure uses only its held-out years. spreadFitResponseCurves_<run> shows the fitted response curves, titled as the model’s response (fireSenseUtils::plotSpreadFitResponse()). Both come from one simulation of objfunFireReps replicates (18 s on ELF 5.3.2). Requires fireSenseUtils@development (>= 0.2.3.9063). Version 1.0.6.9022.spreadObjFunArgs(), R/fitSpread.R) left out escapeSizeHa, jumpTries and jumpMeanDist, so held-out years were simulated without the escape rule the fit used (the default escapeSizeHa is 50 ha). The in-sample simulations already had it.heldOutFold (default NA, unchanged behaviour). Set to 1 or 2 to run that cross-validation fold as its own job: init schedules only spreadFitPrepare, estimateThreshold and crossValidate, never the full fit or the ledger write, and crossValidate fits on the other fold’s years and scores this fold’s held-out years, writing spreadFitHeldOut_<.runName>_fold<heldOutFold>.rds. A run script stops after crossValidate (events = list(.stopAfter = list(fireSense_SpreadFit = "crossValidate"))), same as mode “validate”. Lets the two folds of a held-out experiment run as separate jobs instead of one job doing both. Version 1.0.6.9021.hillSlope1 (the spread link’s slope) is fixed at 1, not fitted by DEoptim. estimateSpreadParams() (fireSense_SpreadFit.R:886-921 pre-fix) put it in the default upper/ lower bounds with [0.2, 2], but with the link’s linear predictor x = covariates %*% beta, hillSlope1 enters only as hillSlope1 * x, so scaling every covariate coefficient by k and dividing hillSlope1 by k leaves every prediction unchanged: it was never identifiable, and let every coefficient drift along that 10x ridge. estimateSpreadParams() no longer emits hillSlope1; fireSenseUtils::.objfunSpreadFit() (>= 0.2.3.9049) reinserts hillSlope1 = 1 before evaluating the fit, and the run event’s ledger row gets it back too (addHillSlope1ToLedger()), so an old ledger row keeps predicting with its own fitted hillSlope1 and a new one predicts with 1. A supplied upper/lower naming hillSlope1 is now an error. Requires fireSenseUtils@development (>= 0.2.3.9049). Version 1.0.6.9020.spreadFitPrep() (fireSense_SpreadFit.R:519-526 pre-fix) appended every non-annual covariate name to youngAge’s own mutuallyExclusiveCols entry, including youngAge itself when it is a non-annual column. fireSenseUtils::makeMutuallyExclusive() then zeroed youngAge on young pixels instead of leaving it at 1, and once zeroed, later columns (e.g. nfLCC_*) were left un-zeroed too. youngAge is now excluded from its own pattern list. Requires fireSenseUtils@development (>= 0.2.3.9048), which fixes the same root cause inside makeMutuallyExclusive(). Version 1.0.6.9019.iterStep parameter (fireSense_SpreadFit.R:63, default 25L) is removed; iterStep is now hard-coded to 1 in fitSpread(). iterStep is supposed to always be 1: with more than one generation per DEoptim call, the run event’s vapply(sim$DE, function(D) D$member$bestvalit, ...) and its numIterations <- length(sim$DE) both assume one generation per block, so a fit with iterStep = 25 crashed after converging (“values must be length 1, but FUN(X[[1]]) result is length 25”). Projects used to set iterStep = 1 themselves; that setting was dropped somewhere along the way. Version 1.0.6.9018.crossValidate event (fireSense_SpreadFit.R:476-477 pre-fix) put mode “validate”’s result in sim$spreadFitHeldOut but never wrote it to disk. Batch runs stop after crossValidate (events = list(.stopAfter = list(fireSense_SpreadFit = "crossValidate"))), so the simList is discarded and the held-out validation was lost. crossValidate now also writes sim$spreadFitHeldOut to file.path(outputPath(sim), currentModule(sim), "spreadFitHeldOut_<.runName>.rds"). Version 1.0.6.9017.estimateSpreadParams() (fireSense_SpreadFit.R:886-889 pre-fix) set the sign of a covariate’s DEoptim bound by whether its name appeared in the annual covariates table, so a non-drought annual covariate (e.g. PPT_sm) was wrongly floored at 0 like a drought index, and the default bounds (upperAndLowerVal = 9, upperAndLowerValFuel = 60) were narrow enough to bind: a held-out experiment (7 ELFs x 2 folds) found climate estimates up to 25.7, youngAge top-10 medians down to -23.0, fuel estimates up to 54.5 (29 of 82 above 25), and non-forest classes reaching +-9. Sign is now decided by term name: drought-index terms (CMD or MDC anywhere in the name) get a lower bound of 0, youngAge gets an upper bound of 0, and every other term, including any other annual covariate, is symmetric. upperAndLowerVal defaults to 50 and upperAndLowerValFuel to 100, wide enough that they constrain sign, not magnitude. Version 1.0.6.9016.runSpreadWithoutDEoptim() drew its threshold-calibration parameter sets unnamed, so fireSenseUtils:::.objfunSpreadFit (which tells a trailing yearSpreadSD bound apart from a logistic parameter only by name) miscounted the logistic parameters and every trial errored; mod$thresh came back NA. Drawn (and unnamed user-supplied) parameter sets are now named with names(lower). Version 1.0.6.9015.histOfCovariates() plotted a hard-coded CMDsm column regardless of which annual climate covariate the ELF actually used, so any ELF with a different column (e.g. CMD, CMD_sp, cumMDC-derived columns) failed inside spreadFitPrepare with “object ‘CMDsm’ not found” as soon as the plot was drawn. It now plots every annual covariate column, faceted by covariate and year, and no longer uses the deprecated aes_string(). Version 1.0.6.9014.yearAreaWeight = "auto" (annual area burned scored against each year’s simulated totals), areaDistWeight = "auto" (area-weighted size distribution), and jumpTries = 20/jumpMeanDist = 3 (a fire stuck below the escape size may jump to nearby burnable land). They reach the fit and both threshold calibrations. This changes the objective, and so the cache key, of every fit; set the weights and jumpTries to 0 for the previous objective.weighted, sizeLik, sizeLikDf, adWeight and link were not passed, so it ran with weighted = TRUE and the “kde” likelihood whatever the fit used. Calibrated thresholds change, and so does the estimateThreshold cache key. weighted = "sqrt" no longer errors in the rough threshold estimate. Version 1.0.6.9013.escapeSizeHa (default 50): the spread model is fitted to escaped fires only, fires that reached that size, and each simulated fire burns that area first before spreading normally. Before, any fire over 1 pixel counted, and many simulated fires never left their first pixel. It reaches the fit (runDEoptim()) and the threshold calibration (runSpreadWithoutDEoptim()), so both evaluate the same objective. NULL/NA gives the old fit. Needs fireSenseUtils >= 0.2.3.9044. Version 1.0.6.9012.spreadFitFilename now defaults to "latest". A fit is written to the file named for its fire years and model, fireSenseUtils::spreadFitFilenameFor() (e.g. fireSenseParams_1985-2024_linearFuel.rds; the years are fireSense_dataPrepFit’s fireYears, else those of the annual covariates), and readers find each polygon’s most recent fit with fireSenseUtils::latestSpreadFits(). A named file is used as before..studyAreaName (default NA), the name PredictiveEcology modules use for the study area. This module does not use it yet.strategy = 6 with DEoptimControl = list(p = 0.1), .c = 0, iterDEoptim = 5000, objfunFireReps = 50 and DEoptimTests = c("adTest", "SNLL_FS").c = 0.1 in 5-generation DEoptim calls; c cannot take effect now (see .c), so the default is 0.iterDEoptim is a ceiling: clusters >= 0.0.46 (now required) stops a fit once the population’s median value has stopped improving.objfunFireReps = 50 and both tests are what production fits have used; no other combination was tested.iterStep > 1, that version runs DEoptim with c = 0, because DEoptim’s F adaptation turns every trial vector into NaN once a call’s first generation has no successful trial. Without it, this module’s defaults (iterStep = 25, .c = 0.5) could crash a fit on every worker, so projects had to set iterStep = 1.yearSpreadSDBounds (default c(0, 1)): the default bounds get yearSpreadSD last, and fireSenseUtils::runDEoptim() (>= 0.2.3.9041) fits it as the sd of a per-year random effect on logit spread probability, a seasonal departure: each year draws one eps, so all of a year’s fires burn hotter or cooler together, which widens the simulated fire-size distribution. NA turns it off. If only one bound is supplied, the other includes yearSpreadSD only if the supplied one does. (Briefly fireSpreadSDBounds, per fire.) This changes every fit’s cache key.covFixedRange also fixes the scale of CMD, CMDsp and cumMDC (all / 100), the other climate candidates of fireSense_dataPrepFit’s spread = "auto", so their coefficients compare across ELFs as CMDsm’s do.sizeLik (default “t”), sizeLikDf, weighted (default FALSE) and adWeight reach the objective in the fit and in the re-score. Fits used “kde” with a log(size) weight before, only because the module could not ask for anything else; “t” without a weight predicted held-out years best in the 2026-09-21 cross-validation. This changes every fit’s cache key.link: “logistic3pUpper” adds upperTail1 (bounds upperTailBounds, default c(-1, 1)), which changes only how the spread probability approaches its ceiling (fireSenseUtils::logistic3pUpper()). The default stays “logistic3p”.postFitDiagnostics, scheduled after run. It makes spreadFitRescore, spreadFitIdentifiability (which covariates are identified in isolation), spreadFitProfile, spreadFitSizes (observed against uncapped simulated fire sizes), spreadFitLinkSaturation and spreadFitConvergence. The costly parts run on the fit’s workers inside runDEoptim(): profileReps (default 10) and simulateMembers (default 10).mode = "validate" adds crossValidate: two fits, each on every other year, predicting the years it did not see (spreadFitHeldOut). It never writes the ledger.covFixedRange (default list(CMDsm = c(0, 100))): covariates rescaled with a fixed range, not the range of the polygon’s data. CMDsm is now CMDsm / 100 everywhere. With the data’s range, 1 meant a CMDsm of 104 in ELF 5.3.2 and 297 in ELF 13.1, so the coefficient meant something different in each polygon, and one that never gets dry stretched its small range over [0, 1]. Pooled over six ELFs on the absolute scale, fire size is flat below a CMDsm of about 125 and about twice as large above 150; no single polygon’s own scale shows that. covFixedRange = list() restores the old behaviour. An NA in the data still reaches the NA check.fireSense_dataPrepFit logged (fireSenseUtils::logMinB()); spreadFitPrepare undoes that with fireSenseUtils::fuelLogToLinear() on a copy, and the supplied covariates are not changed. On the log scale the treed pixels of ELF 5.3.2 fell in 16% of the covariate range and 45% of pixels sat on the floor, so the fuel coefficients estimated little more than treed against treeless. Needs fireSenseUtils >= 0.2.3.9029.covMinMax_spread gives every fuel column c(0, 1e4) (fireSenseUtils::fuelLinearRange) and no longer the data’s shared range. fireSense_SpreadPredict recognises a linear fit by that range, so parameters fitted earlier, on the log scale, still predict as they did.upperAndLowerValFuel (default 60): the default bound of the fuel coefficients. With 9, as for every other covariate, the fuel coefficient sat on its bound.First release from development since master was last updated (2023-09-06). Full history: https://github.com/PredictiveEcology/fireSense_SpreadFit/compare/cfc4cd7…v1.0.6
dataFireSense_SpreadFit (RasterLayer, RasterStack).firePoints (SpatialPointsDataFrame).firePolys (list).flammableRTM (RasterLayer).polyCentroids (list).rasterToMatch is now SpatRaster (was RasterLayer).studyArea is now sf (was SpatialPolygonDataFrame).covMinMax (data.table)..plot, debugMode, fireYears, formula, minBufferSize, parallelMachinesIP, useCentroids..ELFind, .runName, fireBufferedListDT, fireSense_annualSpreadFitCovariates, fireSense_nonAnnualSpreadFitCovariates, fireSense_spreadFormula, parsKnown, spreadFirePoints, spreadFitAdditionalColNames.covMinMax_spread, fsSpreadFit_hists, lociList, studyAreaWithSpreadParams..c, .plotSize, .plots, DEoptimTests, SNLL_FS_thresh, doObjFunAssertions, iterThresh, libPathDEoptim, mode, mutuallyExclusiveCols, rep, spreadFitFilename, spreadFitGoogleDriveFolder, stopIfNoPreRunFit, upperAndLowerVal, useCache_DE.