View source: R/partDependence.R
plot.partDependence | R Documentation |
This function plots the partial dependence of a model on a single variable.
## S3 method for class 'partDependence'
plot(x, n_examples = 19, ...)
x |
An object of class |
n_examples |
Number of examples to plot in addition to the average prediction. |
... |
Further arguments passed to or from other methods. |
A ggplot object.
Markus Ulmer
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.