代码详解:准确率惊人!用Credit R创建信用风险评分模型(12)

#Creating a dataset with the transformed variables and default flag

train_woe <- woe.get.clear.data(train_woedefault_flag = \"creditability\"prefix = \"woe\")

#Applying the WOE rules used on the train data to the test data

test_woe <- woe.binning.deploy(test woerules add.woe.or.dum.var='woe')

test_woe <- woe.get.clear.data(test_woedefault_flag = \"creditability\"prefix = \"woe\")

信息值和单变量基尼系数可以用作选择变量的方法 。 一般来说 , IV的阈值为0.30 , 单变量基尼的阈值为0.10 。

#Performing the IV and Gini calculations for the whole data set

IV.calc.data(train_woe\"creditability\")

输出:

推荐阅读