Learn R Programming

fastml (version 0.7.5)

plot_ice: Plot ICE curves for a fastml model

Description

Generates Individual Conditional Expectation (ICE) plots for selected features using the `pdp` package (ggplot2 engine), and returns both the underlying data and the plot object.

Usage

plot_ice(object, features, ...)

Value

A list with two elements: `data` (the ICE data frame) and `plot` (the ggplot object).

Arguments

object

A `fastml` object.

features

Character vector of feature names to plot.

...

Additional arguments passed to `pdp::partial`.

Examples

Run this code
if (FALSE) {
data(iris)
iris <- iris[iris$Species != "setosa", ]
iris$Species <- factor(iris$Species)
model <- fastml(data = iris, label = "Species")
plot_ice(model, features = "Sepal.Length")
}

Run the code above in your browser using DataLab