lift_plot | R Documentation |
Create lift and gain charts for binary classification problems
lift_plot(actual, prob, positive = "yes")
actual |
actual class. |
prob |
predicted probability of target class. |
positive |
which class is the target class? |
a data frame with lift and gain values for each decile.
# logistic regression example fit <- glm(caesarian ~ ., family=binomial, data = caesarian) pred <- predict(fit, newdata=caesarian, type="response") results <- lift_plot(caesarian$caesarian, pred, positive="yes") print(results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.