Kolmogorov-Smirnov (KS) statistics is used to assess predictive power for marketing or credit risk models. It is the maximum difference between cumulative event and non-event distribution across score/probability bands. The gains table typically has across score bands and can be used to find the KS for a model.
blr_ks_chart(gains_table, title = "KS Chart", yaxis_title = " ", xaxis_title = "Cumulative Population %", ks_line_color = "black")
An object of class
Y axis title.
X axis title.
Color of the line indicating maximum KS statistic.
model <- glm(honcomp ~ female + read + science, data = hsb2, family = binomial(link = 'logit')) gt <- blr_gains_table(model) blr_ks_chart(gt)