plot.partDependence: Plot partial dependence

View source: R/partDependence.R

plot.partDependenceR Documentation

Plot partial dependence

Description

This function plots the partial dependence of a model on a single variable.

Usage

## S3 method for class 'partDependence'
plot(x, n_examples = 19, ...)

Arguments

x

An object of class partDependence returned by partDependence.

n_examples

Number of examples to plot in addition to the average prediction.

...

Further arguments passed to or from other methods.

Value

A ggplot object.

Author(s)

Markus Ulmer

See Also

partDependence set.seed(1) x <- rnorm(10) y <- sign(x) * 3 + rnorm(10) model <- SDTree(x = x, y = y, Q_type = 'no_deconfounding', cp = 0.5) pd <- partDependence(model, 1, X = x) plot(pd)


SDModels documentation built on April 11, 2025, 5:50 p.m.