sc.Misc: Miscellaneous tools for Credit Scoring

Description Usage Arguments Value Examples

Description

These are set of tools for easy credit scorecard build. The set includes sc.score, sc.point and sc.corplot.

Usage

1
2
3
4
5
6
7
sc.score(data, model, pdo, score, odd)

sc.point(data, woe, model, pdo, score, odd)

sc.corplot(model, data, s = NULL)

sc.performance(model, X, y, s = NULL, plot = F)

Arguments

data

A data frame which contains target varible as well as predictor variables.

model

A model built.

pdo

Point double odds.

score

Score at which the desired odd is.

odd

The desired odd.

woe

A woe result which is calculated by woe.

s

In case of using Lasso model. Lambda min or lambda at 1se is chosen.

X

A data frame which has only predictor variables.

y

A vector of target variable.

plot

A logical scalar. Plot ROC curve.

Value

sc.score. The output is a data frame with chosen variables in the model. All variables are in score point. There is also a final score.

sc.point. The output is a list with chosen variables in the model. Variables with their values and score point.

sc.corplot. The output plot is generated showing correlated variables.

sc.performance. The output GINI & KS is printed.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Load library
library(easysc)

# Generate final score data based on the model built with data.
scoredata <- sc.score(data = df, model = model.Lasso, pdo = 100, score = 800, odd = 5)

# Generate final scorecard based on the model built with data.
scorecard <- sc.point(data = df, woe = woe, model = model.Lasso, pdo = 100, score = 800, odd = 5)

## End(Not run)

lmtleminh/easysc documentation built on July 5, 2019, 11:48 a.m.