plot.FeatureEffect {iml} | R Documentation |
Plot FeatureEffect
Description
plot.FeatureEffect()
plots the results of a FeatureEffect object.
Usage
## S3 method for class 'FeatureEffect'
plot(x, rug = TRUE, show.data = FALSE, ylim = NULL)
Arguments
x |
A FeatureEffect object. |
rug |
logical |
show.data |
( |
ylim |
( |
Value
ggplot2 plot object
See Also
Examples
# We train a random forest on the Boston dataset:
if (require("randomForest")) {
data("Boston", package = "MASS")
rf <- randomForest(medv ~ ., data = Boston, ntree = 50)
mod <- Predictor$new(rf, data = Boston)
# Compute the ALE for the first feature
eff <- FeatureEffect$new(mod, feature = "crim")
# Plot the results directly
plot(eff)
}
[Package iml version 0.11.3 Index]