Calculates accumulated local effects (ALE) for the three processes
Usage
ALE(
model,
env = NULL,
init_cohort = NULL,
env_autoscale = TRUE,
sim_seed = 42L,
plot = TRUE,
process = NULL,
scale = FALSE,
...
)Arguments
- model
(
finn_class)
Model object of classfinn_class.- env
(
data.table|data.frame)
Environmental covariates for which the ALE should be calculated. IfNULL(default) the trainingenvcached byfit()is used.- init_cohort
(
CohortMat)
Initial cohort of classCohortMat. IfNULL(default) the training init_cohort cached byfit()is used (or bare ground if none was cached).- env_autoscale
(
logical(1))
IfTRUE(default)envis assumed to be on the raw (unscaled) scale and the model's storedenv_scalingis applied internally before the effects are computed, mirroring how the model was fitted (seefit()'senv_autoscale). SetFALSEifenvis already on the model scale, or for a model fitted without autoscaling.- sim_seed
(
integer(1))
Seed applied viaFINN.seed()before the state-harvesting simulation, so the (stochastic) conditional effects / ALE are reproducible and cacheable.NULLdisables seeding.- plot
(
logical(1))
IfTRUE(default) an ALE plot is drawn viaplot.FINNale()(rows = processes, columns = environmental predictors, one coloured line per species).- process
(
character|NULL)
If given (one of"growth","mortality","regeneration") only that process is plotted.NULL(default) plots all three.- scale
(
logical(1))
IfTRUEeach curve is divided by the SD of its process x species rate, yielding dimensionless, comparable effects (the curve's variance then equals the Sobol-style normalised importance). DefaultFALSE.- ...
Not supported yet.