Description Usage Arguments Details Value
Produce line or raster ggplots of univariate or bivariate partial dependence. i.e., estimates of the marginal relationship between predictor variables and the model’s predictions (probability of intermittence) by holding the rest of the predictors at their respective mean values. Bivariate plots show the co-linearity in response between two predictors.
1 2 3 4 5 6 7 8 9 10 | ggpartialdep(
in_rftuned,
in_predvars,
colnums,
ngrid,
nodupli = T,
nvariate = 2,
parallel = T,
spatial_rsp = FALSE
)
|
in_rftuned |
Output from selecttrain_rf; list containing inner and outer resampling results + task. |
in_predvars |
data.table of predictor variable codes, names and attributes. Output from selectformat_predvars. |
colnums |
number of variables to include, in decreasing order of variable importance. |
ngrid |
number of predictor variable values to check model's marginally predicted value for. |
nodupli |
whether to include variable types only once (i.e. if minimum discharge is in, not including mean discharge) |
nvariate |
(1 or 2) whether to analyze univariate (1) or bivariate (2) partial dependence. |
parallel |
(boolean) whether to compute function in parrallel (as it can be computationally intensive). |
spatial_rsp |
(boolean) whether to use outputs from spatial (TRUE) or non-spatial (FALSE) cross-validation. |
this function is used to produce Figure S5 in the Supplementary Information for Messager et al. 2021. This function was initially developed for bivariate plots but only univariate plots were produced for the final manuscript so there may be obsolete snippets left.
pages of gridded plots with each page containing 9 plots
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.