fw.xpy: Forward variable selection for PDP explanation

Description Usage Arguments Value Author(s) References Examples

View source: R/explainability.R

Description

Computes forward variable selection for partial dependence function based on explainability.

Usage

1
fw.xpy(model, x, target, ...)

Arguments

model

A model with corresponding predict function that returns numeric values.

x

Data frame.

target

Character specifying the name of the (numeric) target variable (must be contained in data).

...

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

Value

Object of class vsexp containing the following elements:

selection.order

Vector of variable names in order of their entrance to the PD function during the variable selection process.

explainability

Explainabilities after the different iterations of the variable selection.

details

A data frame containing the explainabilities for all variables (rows) if they were entered in the model at each step (columns).

Author(s)

gero.szepannek@web.de

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
library(pdp)
library(randomForest)
data(boston)
set.seed(42)
boston.rf <- randomForest(cmedv ~ ., data = boston)
vs <- fw.xpy(boston.rf, boston, "cmedv")
vs

plot(vs)

## End(Not run)

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