Skip to content

KasiaKobylinska/modelStudio

 
 

Repository files navigation

Interactive Studio with Explanations for ML Predictive Models

Project Status: Active – The project has reached a stable, usable state and is being actively developed. CRAN_Status_Badge Build Status Coverage Status DrWhy-eXtrAI JOSS-status

Overview

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.

See a demoexplainFIFA19More

The modelStudio package is a part of the DrWhy.AI universe.

Installation

# Install from CRAN: 
install.packages("modelStudio")

# Install the development version from GitHub:
devtools::install_github("ModelOriented/modelStudio")

Demo

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.

More

Save

Save modelStudio as a HTML file using buttons on the top of the RStudio Viewer or with the r2d3::save_d3_html() function.

Acknowledgments

Work on this package was financially supported by the NCN Opus grant 2016/21/B/ST6/02176.

About

📍 📈 📝 Interactive Studio with Explanations for ML Predictive Models

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • R 75.2%
  • JavaScript 22.1%
  • CSS 2.7%