PDPmatrix: Scatterplot matrix of 2D partial dependence plots

Description Usage Arguments Author(s) References Examples

View source: R/explainability.R

Description

Creates a scatterplot matrix of 2D partial dependence plots.

Usage

1
PDPmatrix(model, x, vnames, depth = 21, alpha = 2/3, ...)

Arguments

model

A model with corresponding predict function that returns numeric values.

x

Data frame.

vnames

Character vector of the variable set for which the patial dependence function is to be computed.

depth

Integer specifiying the number colours in the heat map.

alpha

Numeric value for alpha blending of the points in the scatter plot.

...

Further arguments to be passed to the predict() method of the model.

Author(s)

gero.szepannek@web.de

References

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
library(pdp)
library(randomForest)
data(boston)
set.seed(42)
boston.rf <- randomForest(cmedv ~ ., data = boston)
PDPmatrix(boston.rf, boston, vnames = c("lstat", "rm", "lon", "nox"))

## End(Not run)

g-rho/eXplaAInability documentation built on April 6, 2021, 1:42 a.m.