Learn R Programming

fastml (version 0.7.0)

explain_lime: Generate LIME explanations for a fastml model

Description

Creates a `lime` explainer using the processed training data stored in the `fastml` object and returns feature explanations for new observations.

Usage

explain_lime(object, n_features = 5, n_labels = 1, ...)

Value

An object produced by `lime::explain`.

Arguments

object

A `fastml` object.

n_features

Number of features to show in the explanation. Default 5.

n_labels

Number of labels to explain (classification only). Default 1.

...

Additional arguments passed to `lime::explain`.

Examples

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

Run the code above in your browser using DataLab