WOEplotter: Visualizing WOE and Target Rates

Description Usage Arguments Details Examples

View source: R/Rprofet.R

Description

Function generating three plots: WOE value for each bin, target rate for each bin, and the frequency for each bin

Usage

1
WOEplotter(dataset, target, var, color = "#0066CC")

Arguments

dataset

Dataframe containing binned values and a binary target variable.

target

A numeric binary target variable.

var

The desired WOE binned attribute to visualize.

color

A hexadecimal value representing a specific color.

Details

A list of the hexadecimal colors can be found at this link http://www.sthda.com/sthda/RDoc/images/hextable.gif

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mydata <- ISLR::Default

mydata$ID = seq(1:nrow(mydata)) ## make the ID variable
mydata$default<-ifelse(mydata$default=="Yes",1,0) ## Creating numeric binary target variable

binned <- BinProfet(mydata, id= "ID", target= "default", num.bins = 5) ## Binning variables

WOEplotter(binned, target= "default", var= "income_Bins")

##--Changing Colors------------------------------
WOEplotter(binned, target= "default", var= "income_Bins", color = "#33FF33")

Rprofet documentation built on April 1, 2020, 5:11 p.m.

Related to WOEplotter in Rprofet...