The modelStudio
package automates explanation of machine learning predictive models. This package generates advanced interactive and animated model explanations in the form of a serverless HTML site.
It combines R with D3.js to produce plots and descriptions
for various local and global explanations. Tools for model exploration unite with
tools for EDA (Exploratory Data Analysis) to give a broad overview of the model behaviour.
modelStudio
is a fast and condensed way to get all the answers without much effort. Break down your model and look into its ingredients with only a few lines of code.
The modelStudio
package is a part of the DrWhy.AI universe.
# Install from CRAN:
install.packages("modelStudio")
# Install the development version from GitHub:
devtools::install_github("ModelOriented/modelStudio")
This package bases on DALEX
explainers created with DALEX::explain()
.
library("modelStudio")
# Create a model
model <- glm(survived ~.,
data = DALEX::titanic_imputed,
family = "binomial")
# Wrap it into an explainer
explainer <- DALEX::explain(model,
data = DALEX::titanic_imputed[,-8],
y = DALEX::titanic_imputed[,8],
label = "glm")
# Pick some data points
new_observations <- DALEX::titanic_imputed[1:4,]
rownames(new_observations) <- c("Lucas", "James", "Thomas", "Nancy")
# Make a studio for the model
modelStudio(explainer, new_observations)
More examples here.
Save modelStudio
as a HTML file using buttons on the top of the RStudio Viewer
or with the r2d3::save_d3_html()
function.
Work on this package was financially supported by the NCN Opus grant 2016/21/B/ST6/02176
.