Learn R Programming

modelplotr: Plots to evaluate the business value of predictive models

The modelplotr package makes it easy to create a number of valuable evaluation plots to assess the business value of a predictive model. Using these plots, it can be shown how implementation of the model will impact business targets like response or return on investment of a campaign.

Plots available with modelplotr:

  • cumulative gains
  • cumulative lift
  • response
  • cumulative response
  • costs & revenues
  • profit
  • return on investment

Some benefits of using modelplotr:

  • easy to explain plots to discuss your model with business
  • easy to use on top of predictive models built with caret, mlr, h2o, keras or otherwise (with or without r)
  • supports both binary and multinomial targets
  • provides four plotting scopes:
    • comparing models
    • comparing datasets
    • comparing multiclass target classes
    • no comparison (single line)
  • plot annotation: highlighting specific values and adding explanatory text to guide interpretation
  • plot customization: all textual elements, line colors
  • save plot to file on disk

Installation

You can install modelplotr from GitHub with:

devtools::install_github("modelplot/modelplotr")

See this blog for further details and examples of using the package.

Copy Link

Version

Install

install.packages('modelplotr')

Monthly Downloads

20

Version

1.1.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Jurriaan Nagelkerke

Last Published

October 13th, 2020

Functions in modelplotr (1.1.0)

customize_plot_text

Customize textual elements of the plots
modelplotr

modelplotr: Plots to Evaluate the Business Performance of Predictive Models.
plot_cumgains

Cumulative gains plot
plot_cumlift

Cumulative Lift plot
plot_costsrevs

Costs & Revenues plot
bank_td

Bank clients that have/have not subscribed a term deposit.
build_input_yourself

Example: build required input from a custom model
aggregate_over_ntiles

Build a dataframe with aggregated evaluation measures
plot_cumresponse

Cumulative Respose plot
plot_multiplot

Create plot with all four evaluation plots
plot_roi

ROI plot
prepare_scores_and_ntiles_keras

Build a dataframe containing Actuals, Probabilities and Ntiles for keras models
prepare_scores_and_ntiles

Build a dataframe containing Actuals, Probabilities and Ntiles
plot_profit

Profit plot
plot_response

Response plot
plotting_scope

Build dataframe with formatted input for all plots.