interpret-local-model-methods: Local surrogate result methods for 'local_model' and 'lime'.

interpret-local-model-methodsR Documentation

Local surrogate result methods for local_model and lime.

Description

These methods provide the standard print(), summary(), and plot() interfaces for funcml_iml_local_model objects returned by interpret(method = "local_model") or interpret(method = "lime").

Usage

## S3 method for class 'funcml_iml_local_model'
plot(x, ...)

## S3 method for class 'funcml_lime'
plot(x, ...)

## S3 method for class 'funcml_iml_local_model'
print(x, ...)

## S3 method for class 'funcml_iml_local_model'
summary(object, ...)

Arguments

x

A funcml_iml_local_model object.

...

Additional arguments passed to the underlying method.

object

A funcml_iml_local_model object.

Value

plot() returns a ggplot2 object. print() returns the input object invisibly. summary() returns the local model explanation payload invisibly.

Examples

fit_obj <- fit(mpg ~ wt + hp + disp, data = mtcars, model = "rpart",
  spec = list(cp = 0.01, minsplit = 5))
local_model <- interpret(
  fit = fit_obj,
  data = mtcars,
  method = "local_model",
  newdata = mtcars[1, , drop = FALSE],
  k = 2
)
print(local_model)
summary(local_model)
plot(local_model)

funcml documentation built on Aug. 22, 2026, 5:08 p.m.