Learn R Programming

BCA (version 0.9-2)

lift.chart: Lift Charts to Compare Binary Predictive Models

Description

Provides either a total cumulative response or incremental response rate lift chart for the purposes of comparing the predictive capability of different binary predictive models.

Usage

lift.chart(modelList, data, targLevel, trueResp, type = "cumulative", sub = "")

Arguments

Value

The function returns invisibly. Its benefit is the side effect plot produced.

Details

Lift charts are a commonly used tool in business data mining applications. They are used to assess how well a model is able to predict a desirable (from an organization's point-of-view) response on the part of a customer compared to alternative estimated models and a benchmark model of approaching customers randomly. The total cummulative response chart shows the percentage of the total response the organization would receive from only contacting a given percentage (grouped by deciles) of its entire customer base. This chart is best for selecting between alternative models, and in predicting the revenues the organization will receive by contacting a given percentage of their customers that the model predicts are most likely to favorably respond. The incremental response rate chart provides the response rate among each of ten decile groups of the organization's customers, with the decile groups ordered by their estimated likelihood of a favorable response.

Examples

Run this code
library(rpart)
  layout(matrix(c(1,2), 2, 1))
  data(CCS)
  CCS$Sample <- create.samples(CCS, est=0.4, val=0.4)
  CCSEst <- CCS[CCS$Sample == "Estimation",]
  CCS.glm <- glm(MonthGive ~ DonPerYear + LastDonAmt + Region + YearsGive,
    family=binomial(logit), data=CCSEst)
  library(rpart)
  CCS.rpart <- rpart(MonthGive ~ DonPerYear + LastDonAmt + Region + YearsGive,
    data=CCSEst, cp=0.0074)
  CCSVal <- CCS[CCS$Sample == "Validation",]
  lift.chart(c("CCS.glm", "CCS.rpart"), data=CCSVal, targLevel="Yes",
    trueResp=0.01, type="cumulative", sub="Validation")
  lift.chart(c("CCS.glm", "CCS.rpart"), data=CCSVal, targLevel="Yes",
    trueResp=0.01, type="incremental", sub="Validation")

Run the code above in your browser using DataLab