plot_tuning | R Documentation |
rf_tuning()
Plots the tuning of the hyperparameters num.trees
, mtry
, and min.node.size
performed by rf_tuning()
.
plot_tuning( model, point.color = viridis::viridis( 100, option = "F" ), verbose = TRUE )
model |
A model fitted with |
point.color |
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. |
verbose |
Logical, if |
A ggplot.
rf_tuning()
if(interactive()){ #load example data data(plant_richness_df) #fit 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 ) #tune random forest model rf.model <- rf_tuning( model = rf.model, xy = plant_richness_df[, c("x", "y")], n.cores = 1, verbose = FALSE ) #generate tuning plot plot_tuning(model = rf.model) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.