Plots optimization data frames produced by select_spatial_predictors_sequential()
and select_spatial_predictors_recursive().
plot_optimization(
model,
point.color = viridis::viridis(
100,
option = "F",
direction = -1
),
verbose = TRUE
)A ggplot, or NULL invisibly if no optimization data is available.
A model produced by rf_spatial(), or an optimization data frame produced by select_spatial_predictors_sequential() or select_spatial_predictors_recursive().
Colors of the plotted points. Can be a single color name (e.g. "red4"), a character vector with hexadecimal codes (e.g. "#440154FF" "#21908CFF" "#FDE725FF"), or function generating a palette (e.g. viridis::viridis(100)). Default: viridis::viridis(100, option = "F", direction = -1)
Logical, if TRUE the plot is printed. Default: TRUE
The function returns NULL invisibly (without plotting) when:
The method used to fit a model with rf_spatial() is "hengl" (no optimization required)
No spatial predictors were selected during model fitting
The model is non-spatial
Other visualization:
plot_evaluation(),
plot_importance(),
plot_moran(),
plot_residuals_diagnostics(),
plot_response_curves(),
plot_response_surface(),
plot_training_df(),
plot_training_df_moran(),
plot_tuning()
data(plants_rf_spatial)
plot_optimization(plants_rf_spatial)
Run the code above in your browser using DataLab