ciu.explain.long.data.frame | R Documentation |
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.
ciu.explain.long.data.frame(CIU, data = NULL, out.ind = 1, neutral.CU = 0.5)
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. |
data.frame of class "ciu.result.long.data.frame".
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.