README.md

Hosmer-Lemeshow Test Visualization

Build Status Coverage Status Documentation

The performance of any binary classifier that provides a probabilistic output (rather than a binary value) can be visualized by splitting the target validation population into quantiles of a fixed count (usually 10, that is, deciles) and comparing the empirical incidence of the dependent variable to the probabilistic response outputted by the classifier. This is meant to represent a visualization of the Hosmer-Lemeshow goodness of fit test

The validationplot package makes this endeavour straightforward, especially in conjunction with the tundra package.

Installation

This package is not yet available from CRAN (as of October 17, 2015). To install the latest development builds directly from GitHub, run this instead:

if (!require("devtools")) install.packages("devtools")
devtools::install_github("avantcredit/make_validation_plot")
library(validationplot)

When evaluating binary classification models one posses the flexibility to generate overlayed lift charts when comparing classifier performance.

 set.seed(100) 
 validation_dat <- data.frame(dep_var = sample(c(1, 0), 1000, replace = TRUE))
 good_preds     <- validation_dat[['dep_var']] + rnorm(NROW(validation_dat))
 bad_preds      <- rnorm(NROW(validation_dat))
 make_validation_plot(models = list(good_model = good_preds, bad_model  = bad_preds),
                      validation_data = validation_dat, 
                      title = 'Binary Classification Comparison')

plot of chunk unnamed-chunk-1

License

This project is licensed under the MIT License:

Copyright (c) 2015-2016 Avant

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Authors

The initial functionality provided in the package was created by physicist Ryland Ely. Some subsequent maintanenance was provided by Robert Krzyzanowski, rkrzyzanowski@gmail.com.



avantcredit/make_validation_plot documentation built on May 11, 2019, 4:07 p.m.