plot_evaluation {spatialRF} | R Documentation |
Plots the results of a spatial cross-validation
Description
Plots the results of an spatial cross-validation performed with rf_evaluate()
.
Usage
plot_evaluation(
model,
fill.color = viridis::viridis(
3,
option = "F",
alpha = 0.8,
direction = -1
),
line.color = "gray30",
verbose = TRUE,
notch = TRUE
)
Arguments
model |
A model resulting from |
fill.color |
Character vector with three hexadecimal codes (e.g. "#440154FF" "#21908CFF" "#FDE725FF"), or function generating a palette (e.g. |
line.color |
Character string, color of the line produced by |
verbose |
Logical, if |
notch |
Logical, if |
Value
A ggplot.
See Also
rf_evaluate()
, get_evaluation()
, print_evaluation()
.
Examples
if(interactive()){
#loading example data
data(plant_richness_df)
data(distance_matrix)
#fitting a random forest model
rf.model <- rf(
data = plant_richness_df,
dependent.variable.name = "richness_species_vascular",
predictor.variable.names = colnames(plant_richness_df)[5:21],
distance.matrix = distance_matrix,
distance.thresholds = 0,
n.cores = 1,
verbose = FALSE
)
#evaluating the model with spatial cross-validation
rf.model <- rf_evaluate(
model = rf.model,
xy = plant_richness_df[, c("x", "y")],
n.cores = 1
)
#plotting the evaluation results
plot_evaluation(rf.model)
}
[Package spatialRF version 1.1.4 Index]