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")

# visualize all information for optimal_bins class
plot(bin)

# visualize WoE information for optimal_bins class
plot(bin, type = "WoE")

# visualize all information without typographic
plot(bin, typographic = FALSE)

# extract binned results
extract(bin) %>% 
  head(20)



dlookr documentation built on July 9, 2023, 6:31 p.m.