ciu.explain.long.data.frame {ciu} | R Documentation |
Produce CIU explanations as "long" data.frame
Description
This function takes a CIU object and calculates CIU values for the whole data
set given as parameter to ciu.new or given as the data
parameter.
Usage
ciu.explain.long.data.frame(CIU, data = NULL, out.ind = 1, neutral.CU = 0.5)
Arguments
CIU |
CIU object, as created by ciu.new. |
data |
Data to use as data.frame (default: NULL). If NULL, then use the data of the CIU object, if that exists. This data.frame must contain only feature (input) values, not output value(s). |
out.ind |
Index of output to explain. Default: 1. |
neutral.CU |
Neutral CU value(s). Default is 0.5. |
Value
data.frame of class "ciu.result.long.data.frame".
Examples
## Not run:
# Boston data set with GBM model.
library(MASS)
library(caret)
kfoldcv <- trainControl(method="cv", number=10)
gbm <- caret::train(medv ~ ., Boston, method="gbm", trControl=kfoldcv)
ciu <- ciu.new(gbm, medv~., Boston)
df <- ciu.explain.long.data.frame(ciu)
head(df)
# Only get results for a part of the data set.
ciu.explain.long.data.frame(ciu, data=subset(Boston[1:10,], select=-medv))
## End(Not run)
[Package ciu version 0.8 Index]