Lorenz curve is a visual representation of inequality. It is used to measure the discriminatory power of the predictive model.
blr_lorenz_curve(
model,
data = NULL,
title = "Lorenz Curve",
xaxis_title = "Cumulative Events %",
yaxis_title = "Cumulative Non Events %",
diag_line_col = "red",
lorenz_curve_col = "blue",
print_plot = TRUE
)An object of class glm. Only binary logistic regression models (binomial family with logit link) are supported. Weighted models (any prior weight other than 1) and grouped binomial models (cbind(successes, failures) or proportions) are not supported; the model must be fitted with model = TRUE, y = TRUE.
A tibble or data.frame.
Plot title.
X axis title.
Y axis title.
Diagonal line color.
Color of the lorenz curve.
logical; if TRUE, prints the plot else returns a plot object.
Hand, D. J. and Till, R. J. (2001). A simple generalisation of the area under the ROC curve for multiple class classification problems. Machine Learning, 45(2), 171--186.
Hanley, J. A. and McNeil, B. J. (1982). The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology, 143(1), 29--36.
Mann, H. B. and Whitney, D. R. (1947). On a test of whether one of two random variables is stochastically larger than the other. The Annals of Mathematical Statistics, 18(1), 50--60.
Other model validation techniques:
blr_confusion_matrix(),
blr_decile_capture_rate(),
blr_decile_lift_chart(),
blr_gains_table(),
blr_gini_index(),
blr_ks_chart(),
blr_roc_curve(),
blr_test_hosmer_lemeshow()
model <- glm(honcomp ~ female + read + science, data = hsb2,
family = binomial(link = 'logit'))
blr_lorenz_curve(model)
Run the code above in your browser using DataLab