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

# Attaching the library

library(creditR)

#Model data and data structure

data(\"germancredit\")

str(germancredit)

#Preparing a sample data set

sample_data <- germancredit[c(\"duration.in.month\"\"credit.amount\"\"installment.rate.in.percentage.of.disposable.income\" \"age.in.years\"\"creditability\")

#Converting the ‘Creditability’ (default flag) variable into numeric type

sample_data$creditability <- ifelse(sample_data$creditability == \"bad\"10)

#Calculating the missing ratios

missing_ratio(sample_data)

输出:

推荐阅读