smbinning.scaling: Scaling
object to generate variables
smbcbs1=smbinning(train,x="cbs1",y="fgood")
smbcbinq=smbinning.factor(train,x="cbinq",y
object to generate variables
smbcbs1=smbinning(train,x="cbs1",y="fgood")
smbcbinq=smbinning.factor(train,x="cbinq",y
# Example: Metrics Credit Score 1
smbinning.metrics(dataset=smbsimdf1,prediction="cbs1",actualclass="fgood
,y="fgood",x="cbs1") # Run and save result
smbinning.sql(result)
# Example 2: Binning for a factor variable
=smbsimdf1,y="fgood",x="cbs1") # Run and save result
par(mfrow=c(2,2))
boxplot(smbsimdf1$cbs1~smbsimdf1$fgood
the target variable is fgood,
which represents the binary status of default (0) and not default (1).
Format
=ZEach[zGood,]
###Update P
PFromZ=colSums(ZEach[zGood,])/length(zGood)
(sapply(bad, function(p) {
-(x[p[1L]] - x[p[2L]])
fgood = -Inf
=ZEach[zGood,]
###Update P
PFromZ=colSums(ZEach[zGood,])/length(zGood)
, "cbs1", "fgood", initial_bins = 10)
out <- apply_woe(chileancredit, woe_object)
#Above example to create and apply woe segmentation
## Not run:
data(chileancredit, package = "smbinning")
data <- subset(chileancredit, select = -c(period))
- bin & woe
Examples
library(smbinning)
combination of characteristics
smbinning.logitrank(y="fgood",chr=c("chr1","chr2","chr3"),df=smbsimdf3)
(pop,rnd<=0.7) # Training sample
# Binning application for a numeric variable
result=smbinning(df=train,y="fgood",x="dep
: Information Value Summary
testiv=smbinning.sumiv(test,y="fgood")
testiv
dataset
library(smbinning) # Load package and its data
# Binning a factor variable
",
actualclass="fgood", returndf=1)
# Example 1: Plots based on optimal cutoff
first (min) and last (max) values
# Example: Customized binning
result=smbinning.custom(df=smbsimdf1,y="fgood",x="cbs1
variable on training data
result=smbinning.factor(train,x="home",y="fgood")
# Example: Append new binned characteristic
smbsimdf1,x="inc",
y="fgood",
c("'W01','W02'", # Group 1
iteration
e) IV - Information Value for the final iteration
Examples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.