Audit of regression models
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R fix ::: note Dec 28, 2018
binder
data
docs Change examples in vignettes into DALEX2 dragons Dec 28, 2018
inst Add CITATION Oct 3, 2018
jupyter-notebooks autor and grant Oct 29, 2018
man
materials
tests
vignettes Change examples in vignettes into DALEX2 dragons Dec 28, 2018
.Rbuildignore Add auditorData Aug 26, 2018
.gitignore
.travis.yml
DESCRIPTION
NAMESPACE
NEWS.md
README.md
_pkgdown.yml
auditor.Rproj fix tests May 8, 2018
codecov.yml

README.md

The auditor package - model verification, validation, and error analysis

CRAN_Status_Badge Total Downloads Build Status Coverage Status Binder Tweet

auditor's pipeline: model %>% audit() %>% plot(type=...)

Preprint

A preprint of the article about auditor is available on arxiv.

Installation

from GitHub

devtools::install_github("mi2datalab/auditor")

and from CRAN

install.packages("auditor")

News

Reference Manual

DEMO

Run the code below or try the auditor by the online jupyter-notebook: Binder

library(auditor)
library(randomForest)
data(mtcars)

# fitting models
model_lm <- lm(mpg ~ ., data = mtcars)
set.seed(123)
model_rf <- randomForest(mpg ~ ., data = mtcars)

# creating a modelAudit object which contains all necessary components required for further processing
au_lm <- audit(model_lm)
au_rf <- audit(model_rf, label = "rf")

# generating plots
plot(au_lm, type = "Residual")
plot(au_lm, au_rf, type = "Residual")

plot(au_lm, au_rf, variable = "wt", type = "Prediction")

plot(au_lm, au_rf, type = "ModelCorrelation")
plot(au_lm, au_rf, variable = "wt", type = "ModelCorrelation")

# plots above are availible also via plotResidual(), plotPrediction() and plotModelCorrelation() functions

For more plot types and examples see A Short Overview of Plots section below.

Cheatsheets

A Short Overview of Plots

Plot name Function Regression Classification Examples
Autocorrelation Function plotACF()
plot(..., type = "ACF")
yes yes Examples
Autocorrelation plotAutocorrelation()
plot(..., type = "Autocorrelation")
yes yes Examples
Influence of observations plotCooksDistance()
plot(..., type = "CooksDistance")
yes yes Examples
Half-Normal plotHalfNormal()
plot(..., type = "HalfNormal")
yes yes Examples
LIFT Chart plotLIFT()
plot(..., type = "LIFT")
no yes Examples
Model Correlation plotModelCorrelation()
plot(..., type = "ModelCorrelation")
yes yes Examples
Principal Component Analysis of models plotModelPCA()
plot(..., type = "ModelPCA")
yes yes Examples
Model Ranking Plot plotModelRanking()
plot(..., type = "ModelRanking")
yes yes Examples
Predicted Response vs Observed or Variable Values plotPrediction()
plot(..., type = "Prediction")
yes yes Examples
Regression Error Characteristic Curves (REC) plotREC()
plot(..., type = "REC")
yes yes Examples
Plot Residuals vs Observed, Fitted or Variable Values plotResidual()
plot(..., type = "Residual")
yes yes Examples
Residual Boxplot plotResidualBoxplot()
plot(..., type = "ResidualBoxplot")
yes yes Examples
Residual Density plotResidualDensity()
plot(..., type = "ResidualDensity")
yes yes Examples
Receiver Operating Characteristic (ROC) plotROC()
plot(..., type = "ROC")
no yes Examples
Regression Receiver Operating Characteristic (RROC) plotRROC()
plot(..., type = "RROC")
yes yes Examples
Scale-Location plot plotScaleLocation()
plot(..., type = "ScaleLocation")
yes yes Examples
Two-sided Cumulative Distribution Function plotTwoSidedECDF()
plot(..., type = "TwoSidedECDF")
yes yes Examples

Acknowledgments

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

More

Presentation during Knowledge Network Tech Meetup