imlplots: Interactive Plots for Interpretable Machine Learning

Description Usage Arguments Note Author(s) References Examples

Description

The function imlplots() creates an interactive shiny based dashboard for visualizing the effects of statistical models. The utilization of mlr (Machine Learning in R) is necessary. For more infos go to https://github.com/mlr-org

There are three types of plots: Partial Dependence Plots (PDP), Individual Conditional Expectation (ICE) plots and Accumulated Local Effects (ALE) plots.

Usage

1
imlplots(data, task, models, model.check = "all.features")

Arguments

data

Input data frame. Has to contain exactly the same variables as the training data.

task

The mlr task the models were being trained on, e.g. iris.task = makeClassifTask(data = iris, target = "Species"). Classification and regression tasks are supported.

models

A list of mlr trained models, e.g. list(rf.mod, glm.mod).
You can provide differently tuned models of the same learner by assigning a unique ID to the learner, e.g. makeLearner("regr.randomForest", id = "ownId")

model.check

A string. A model check is performed upon initialization, whether the provided models can be used to properly predict.
'all.features' iteratively checks all model/feature combinations. 'sample.feature' randomly selects a single feature from the feature space and checks all models with it.

Note

The plots display combinations of different inputs and outputs/ predictions. Therefore they are highly sensitive to the trained and provided models.

The variable of interest provides variations of different inputs, while all other variables are held constant. You can look at how the predictions change, if you had provided different test data, by either filtering/ subsetting the data or manually setting a variable to a fixed value for all observations.

The function performs a basic check upon initialization, whether the provided models can be used to properly predict. If the check fails, it is recommended to manually test the model with the marginalPrediction() function of the mmpf package.

Author(s)

Julia Fried, Tobias Riebe, Christian Scholbeck; in cooperation with the working group for computational statistics at Ludwigs-Maximilians-University Munich.

References

Apley (2016). "Visualizing the Effects of Predictor Variables in Black Box Supervised Learning Models"

Bischl et. al (2016). "mlr: Machine Learning in R." Journal of Machine Learning Research, 17(170), pp.

Friedman, J.H. (2001). "Greedy Function Approximation: A Gradient Boosting Machine." Annals of Statistics 29: 1189 - 1232.

Goldstein et al. (2013). "Peeking Inside the Black Box: Visualizing Statistical Learning with Plots of Individual Conditional Expectation"

Jones (2017). "mmpf: Monte-Carlo Methods for Prediction Functions "The R Journal Vol. XX/YY, AAAA 20ZZ

Examples

1
2
3
4
tsk = makeRegrTask(data = boston, target = "medv")
mod.rf = train("regr.randomForest", task = tsk)
mod.glm = train("regr.glm", task = tsk)
imlplots(boston, tsk, list(mod.rf, mod.glm))

juliafried/imlplots documentation built on May 29, 2019, 10:38 a.m.