Git Product home page Git Product logo

auditor's Introduction

Model verification, validation, and error analysis

CRAN_Status_Badge Build Status Coverage Status

Overview

Package auditor is a tool for model-agnostic validation. Implemented techniques facilitate assessing and comparing the goodness of fit and performance of models. In addition, they may be used for the analysis of the similarity of residuals and for the identification of outliers and influential observations. The examination is carried out by diagnostic scores and visual verification. Due to the flexible and consistent grammar, it is simple to validate models of any classes.

auditor is a part of DrWhy collection of tools for Visual Exploration, Explanation and Debugging of Predictive Models.

auditor’s pipeline: model %>% DALEX::explain() %>% plot(type=…)

Installation

Stable version from CRAN:

install.packages("auditor")

Developer version from GitHub:

source("https://install-github.me/ModelOriented/auditor")

# or with the devtools package
devtools::install_github("ModelOriented/auditor")

Demo

Run the code below or try the auditor.

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

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

# creating objects with 'explain' function from the package DALEX
# that contains all necessary components required for further processing
exp_lm <- DALEX::explain(model_lm, data = mtcars, y = mtcars$mpg,  verbose = FALSE)
exp_rf <- DALEX::explain(model_rf, data = mtcars, y = mtcars$mpg, label = "rf", verbose = FALSE)

# create explanation  objects
mr_lm <- model_residual(exp_lm)
mr_rf <- model_residual(exp_rf)

# generating plots
plot_residual(mr_lm, mr_rf, variable = "wt", smooth = TRUE)

More

A short overview of plots

Column type contains character that should be passed to parameter type= when using plot() function. Regr and Class columns indicate whether plot can be used for regression and classification models.

Name of a plot Function Interactive version Type Regr Class
Autocorrelation Function plot_acf() plotD3_acf() “acf” yes yes
Autocorrelation plot_autocorrelation() plotD3_autocorrelation() “autocorrelation” yes yes
Influence of Observations plot_cooksdistance() plotD3_cooksdistance() “cooksdistance” yes yes
Half-Normal plot_halfnormal() plotD3_halfnormal() “halfnormal” yes yes
LIFT Chart plot_lift() plotD3_lift() “lift” no yes
Model Correlation plot_correlation() - “correlation” yes yes
Principal Component Analysis of Models plot_pca() - “pca” yes yes
Model Ranking Radar Plot plot_radar() - “radar” yes yes
Predicted Response vs Actual or Variable Values plot_prediction() plotD3_prediction() “prediction” yes yes
Regression Error Characteristic Curve (REC) plot_rec() plotD3_rec() “rec” yes yes
Plot Residuals vs Actual, Fitted or Variable Values plot_residual() plotD3_residual() “residual” yes yes
Residual Boxplot plot_residual_boxplot() - “residual_boxplot” yes yes
Residual Density plot_residual_density() - “residual_density” yes yes
Receiver Operating Characteristic (ROC) Curve plot_roc() - “roc” no yes
Regression Receiver Operating Characteristic (RROC) plot_rroc() - “rroc” yes yes
Scale-Location Plot plot_scalelocation() plotD3_scalelocation() “scalelocation” yes yes
Two-sided Cumulative Distribution Function plot_tsecdf() - “tsecdf” yes yes

Acknowledgments

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

auditor's People

Contributors

agosiewska avatar byrolew avatar hbaniecki avatar maksymiuks avatar michbur avatar mstaniak avatar pbiecek avatar tmikolajczyk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.