Learn R Programming

auditor (version 0.2.1)

plotLIFT: LIFT Chart

Description

LIFT Chart shows the ratio of a model to a random guess.

Usage

plotLIFT(object, ..., groups = 10, cumulative = TRUE)

Arguments

object

An object of class ModelAudit.

...

Other modelAudit objects to be plotted together.

groups

Number of groups.

cumulative

If TRUE cumulative lift curve will be plotted.

Value

ggplot object

Details

Response vector provided by y argument in audit function should be an integer vector containing binary labels with values 0,1.

See Also

plot.modelAudit

Examples

Run this code
# NOT RUN {
library(mlbench)
data("PimaIndiansDiabetes")
Pima <- PimaIndiansDiabetes
Pima$diabetes <- ifelse(Pima$diabetes == "pos", 1, 0)
glm_model <- glm(diabetes~., family=binomial,	data=Pima)
glm_au <- audit(glm_model, data = Pima, y = Pima$diabetes)
plotLIFT(glm_au)

# }

Run the code above in your browser using DataLab