This function plots the variable importance for a given model.
Usage
plot_importance(model, model_name, type_plot = "basic")
Arguments
- model
A trained model object.
- model_name
The name of the model (used for the plot title).
- type_plot
The type of plot basic or enhanced (default "basic").
Value
A ggplot object showing variable importance.
Examples
library(mlbench)
data("PimaIndiansDiabetes", package = "mlbench")
# results <- model_comparer(PimaIndiansDiabetes, "diabetes",
# for_utest = FALSE)
# plot_importance(results$trained_models$lvq, "LVQ")