plot.infogain_bins: Visualize Distribution for an "infogain_bins" Object

plot.infogain_binsR Documentation

Visualize Distribution for an "infogain_bins" Object

Description

It generates plots for understand distribution and distribution by target variable using infogain_bins.

Usage

## S3 method for class 'infogain_bins'
plot(x, type = c("bar", "cross"), typographic = TRUE, base_family = NULL, ...)

Arguments

x

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

type

character. options for visualization. Distribution("bar"), Relative Frequency by target ("cross").

typographic

logical. Whether to apply focuses on typographic elements to ggplot2 visualization. The default is TRUE. if TRUE provides a base theme that focuses on typographic elements using hrbrthemes package.

base_family

character. The name of the base font family to use for the visualization. If not specified, the font defined in dlookr is applied. (See details)

...

further arguments to be passed from or to other methods.

Details

The base_family is selected from "Roboto Condensed", "Liberation Sans Narrow", "NanumSquare", "Noto Sans Korean". If you want to use a different font, use it after loading the Google font with import_google_font().

Value

An object of gtable class.

See Also

binning_rgr, summary.bins

Examples


# binning by recursive information gain ratio maximization using character
bin <- binning_rgr(heartfailure, "death_event", "creatinine")

# binning by recursive information gain ratio maximization using name
bin <- binning_rgr(heartfailure, death_event, creatinine)
bin

# summary optimal_bins class
summary(bin)

# visualize all information for optimal_bins class
plot(bin)

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

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



choonghyunryu/dlookr documentation built on June 11, 2024, 9:12 a.m.