summary.optimal_bins: Summarizing Performance for Optimal Bins

summary.optimal_binsR Documentation

Summarizing Performance for Optimal Bins

Description

summary method for "optimal_bins". summary metrics to evaluate the performance of binomial classification model.

Usage

## S3 method for class 'optimal_bins'
summary(object, ...)

Arguments

object

an object of class "optimal_bins", usually, a result of a call to binning_by().

...

further arguments to be passed from or to other methods.

Details

print() to print only binning table information of "optimal_bins" objects. summary.performance_bin() includes general metrics and result of significance tests life follows.:

  • Binning Table : Metrics by bins.

    • CntRec, CntPos, CntNeg, RatePos, RateNeg, Odds, WoE, IV, JSD, AUC.

  • General Metrics.

    • Gini index.

    • Jeffrey's Information Value.

    • Jensen-Shannon Divergence.

    • Kolmogorov-Smirnov Statistics.

    • Herfindahl-Hirschman Index.

    • normalized Herfindahl-Hirschman Index.

    • Cramer's V Statistics.

  • Table of Significance Tests.

Value

NULL.

See Also

binning_by, plot.optimal_bins

Examples

library(dplyr)

# Generate data for the example
heartfailure2 <- heartfailure
heartfailure2[sample(seq(NROW(heartfailure2)), 5), "creatinine"] <- NA

# optimal binning
bin <- binning_by(heartfailure2, "death_event", "creatinine")
bin

# summary optimal_bins class
summary(bin)

# performance table
attr(bin, "performance")

# extract binned results
if (!is.null(bin)) {
  extract(bin) %>% 
    head(20)
}


dlookr documentation built on May 29, 2024, 2 a.m.