plot.global_importance {vivo} | R Documentation |
Plot Global Variable Importance measure
Description
Function plot.global_importance plots global importance measure based on Partial Dependence profiles.
Usage
## S3 method for class 'global_importance'
plot(x, ..., variables = NULL, type = NULL, title = "Variable importance")
Arguments
x |
object returned from |
... |
other object returned from |
variables |
if not |
type |
a character. How variables shall be plotted? Either "bars" (default) or "lines". |
title |
the plot's title, by default |
Value
a ggplot2 object
Examples
library("DALEX")
data(apartments)
library("randomForest")
apartments_rf_model <- randomForest(m2.price ~ construction.year + surface +
floor + no.rooms, data = apartments)
explainer_rf <- explain(apartments_rf_model, data = apartmentsTest[,2:5],
y = apartmentsTest$m2.price)
profiles <- model_profile(explainer_rf)
library("vivo")
measure <- global_variable_importance(profiles)
plot(measure)
[Package vivo version 0.2.1 Index]