summary.performance_bin: Summarizing Performance for Binned Variable

summary.performance_binR Documentation

Summarizing Performance for Binned Variable

Description

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

Usage

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

Arguments

object

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

...

further arguments to be passed from or to other methods.

Details

print() to print only binning table information of "performance_bin" 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

performance_bin, plot.performance_bin, binning_by, summary.optimal_bins.

Examples


# Generate data for the example
heartfailure2 <- heartfailure

set.seed(123)
heartfailure2[sample(seq(NROW(heartfailure2)), 5), "creatinine"] <- NA

# Change the target variable to 0(negative) and 1(positive).
heartfailure2$death_event_2 <- ifelse(heartfailure2$death_event %in% "Yes", 1, 0)

# Binnig from creatinine to platelets_bin.
breaks <- c(0,  1,  2, 10)
heartfailure2$creatinine_bin <- cut(heartfailure2$creatinine, breaks)

# Diagnose performance binned variable
perf <- performance_bin(heartfailure2$death_event_2, heartfailure2$creatinine_bin) 
perf
summary(perf)

# plot(perf)

# Diagnose performance binned variable without NA
perf <- performance_bin(heartfailure2$death_event_2, heartfailure2$creatinine_bin, na.rm = TRUE) 
perf
summary(perf)

plot(perf)



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