lift_plot: Lift and gain charts

Description Usage Arguments Value Examples

View source: R/lift.R

Description

Create lift and gain charts for binary classification problems

Usage

1
lift_plot(actual, prob, positive = "yes")

Arguments

actual

actual class.

prob

predicted probability of target class.

positive

which class is the target class?

Value

a data frame with lift and gain values for each decile.

Examples

1
2
3
4
5
6
7
# logistic regression example
data(heart)
heart <- na.omit(heart)
fit <- glm(disease ~ . , heart, family=binomial)
pred <- predict(fit, newdata=heart, type="response")
results <- lift_plot(heart$disease, pred, positive="yes")
print(results)

Rkabacoff/qacr documentation built on March 20, 2021, 3:03 p.m.