ML之LoR:基于信用卡数据集利用LoR逻辑回归算法实现如何开发通用信用风险评分卡模型之以toad框架全流程讲解
目录
基于信用卡数据集利用LoR逻辑回归算法实现如何开发通用信用风险评分卡模型之以toad框架全流程讲解
1.3、输出连续型变量的mean、std、min、3种分位数、max
2.2、分析每个特征的iv、基尼系数gini、熵entropy、unique等
2.5.2、绘制每一箱的占比柱状图、及其对应的坏样本率折线图
2.5.3、调整分箱:使得bad_rate整体上呈现单调的趋势
相关文章
ML之LoR:基于信用卡数据集利用LoR逻辑回归算法实现如何开发通用信用风险评分卡模型之以toad框架全流程讲解
ML之LoR:基于信用卡数据集利用LoR逻辑回归算法实现如何开发通用信用风险评分卡模型之以toad框架全流程讲解代码实现
将由一组属性描述的债务人分类为良好或不良信用风险的信用数据。 https://archive.ics.uci.edu/ml/datasets/Statlog+
status.of.existing.checking.account | duration.in.month | credit.history | purpose | credit.amount | savings.account.and.bonds | present.employment.since | installment.rate.in.percentage.of.disposable.income | personal.status.and.sex | other.debtors.or.guarantors | present.residence.since | property | age.in.years | other.installment.plans | housing | number.of.existing.credits.at.this.bank | job | number.of.people.being.liable.to.provide.maintenance.for | telephone | foreign.worker | creditability | |
0 | ... < 0 DM | 6 | critical account/ other credits existing (not at this bank) | radio/television | 1169 | unknown/ no savings account | ... >= 7 years | 4 | male : divorced/separated | none | 4 | real estate | 67 | none | own | 2 | skilled employee / official | 1 | yes, registered under the customers name | yes | good |
1 | 0 <= ... < 200 DM | 48 | existing credits paid back duly till now | radio/television | 5951 | ... < 100 DM | 1 <= ... < 4 years | 2 | male : divorced/separated | none | 2 | real estate | 22 | none | own | 1 | skilled employee / official | 1 | none | yes | bad |
2 | no checking account | 12 | critical account/ other credits existing (not at this bank) | education | 2096 | ... < 100 DM | 4 <= ... < 7 years | 2 | male : divorced/separated | none | 3 | real estate | 49 | none | own | 1 | unskilled - resident | 2 | none | yes | good |
3 | ... < 0 DM | 42 | existing credits paid back duly till now | furniture/equipment | 7882 | ... < 100 DM | 4 <= ... < 7 years | 2 | male : divorced/separated | guarantor | 4 | building society savings agreement/ life insurance | 45 | none | for free | 1 | skilled employee / official | 2 | none | yes | good |
4 | ... < 0 DM | 24 | delay in paying off in the past | car (new) | 4870 | ... < 100 DM | 1 <= ... < 4 years | 3 | male : divorced/separated | none | 4 | unknown / no property | 53 | none | for free | 2 | skilled employee / official | 2 | none | yes | bad |
5 | no checking account | 36 | existing credits paid back duly till now | education | 9055 | unknown/ no savings account | 1 <= ... < 4 years | 2 | male : divorced/separated | none | 4 | unknown / no property | 35 | none | for free | 1 | unskilled - resident | 2 | yes, registered under the customers name | yes | good |
6 | no checking account | 24 | existing credits paid back duly till now | furniture/equipment | 2835 | 500 <= ... < 1000 DM | ... >= 7 years | 3 | male : divorced/separated | none | 4 | building society savings agreement/ life insurance | 53 | none | own | 1 | skilled employee / official | 1 | none | yes | good |
7 | 0 <= ... < 200 DM | 36 | existing credits paid back duly till now | car (used) | 6948 | ... < 100 DM | 1 <= ... < 4 years | 2 | male : divorced/separated | none | 2 | car or other, not in attribute Savings account/bonds | 35 | none | rent | 1 | management/ self-employed/ highly qualified employee/ officer | 1 | yes, registered under the customers name | yes | good |
8 | no checking account | 12 | existing credits paid back duly till now | radio/television | 3059 | ... >= 1000 DM | 4 <= ... < 7 years | 2 | male : divorced/separated | none | 4 | real estate | 61 | none | own | 1 | unskilled - resident | 1 | none | yes | good |
9 | 0 <= ... < 200 DM | 30 | critical account/ other credits existing (not at this bank) | car (new) | 5234 | ... < 100 DM | unemployed | 4 | male : divorced/separated | none | 2 | car or other, not in attribute Savings account/bonds | 28 | none | own | 2 | management/ self-employed/ highly qualified employee/ officer | 1 | none | yes | bad |
10 | 0 <= ... < 200 DM | 12 | existing credits paid back duly till now | car (new) | 1295 | ... < 100 DM | ... < 1 year | 3 | male : divorced/separated | none | 1 | car or other, not in attribute Savings account/bonds | 25 | none | rent | 1 | skilled employee / official | 1 | none | yes | bad |
11 | ... < 0 DM | 48 | existing credits paid back duly till now | business | 4308 | ... < 100 DM | ... < 1 year | 3 | male : divorced/separated | none | 4 | building society savings agreement/ life insurance | 24 | none | rent | 1 | skilled employee / official | 1 | none | yes | bad |
12 | 0 <= ... < 200 DM | 12 | existing credits paid back duly till now | radio/television | 1567 | ... < 100 DM | 1 <= ... < 4 years | 1 | male : divorced/separated | none | 1 | car or other, not in attribute Savings account/bonds | 22 | none | own | 1 | skilled employee / official | 1 | yes, registered under the customers name | yes | good |
13 | ... < 0 DM | 24 | critical account/ other credits existing (not at this bank) | car (new) | 1199 | ... < 100 DM | ... >= 7 years | 4 | male : divorced/separated | none | 4 | car or other, not in attribute Savings account/bonds | 60 | none | own | 2 | unskilled - resident | 1 | none | yes | bad |
14 | ... < 0 DM | 15 | existing credits paid back duly till now | car (new) | 1403 | ... < 100 DM | 1 <= ... < 4 years | 2 | male : divorced/separated | none | 4 | car or other, not in attribute Savings account/bonds | 28 | none | rent | 1 | skilled employee / official | 1 | none | yes | good |
15 | ... < 0 DM | 24 | existing credits paid back duly till now | radio/television | 1282 | 100 <= ... < 500 DM | 1 <= ... < 4 years | 4 | male : divorced/separated | none | 2 | car or other, not in attribute Savings account/bonds | 32 | none | own | 1 | unskilled - resident | 1 | none | yes | bad |
16 | no checking account | 24 | critical account/ other credits existing (not at this bank) | radio/television | 2424 | unknown/ no savings account | ... >= 7 years | 4 | male : divorced/separated | none | 4 | building society savings agreement/ life insurance | 53 | none | own | 2 | skilled employee / official | 1 | none | yes | good |
17 | ... < 0 DM | 30 | no credits taken/ all credits paid back duly | business | 8072 | unknown/ no savings account | ... < 1 year | 2 | male : divorced/separated | none | 3 | car or other, not in attribute Savings account/bonds | 25 | bank | own | 3 | skilled employee / official | 1 | none | yes | good |
18 | 0 <= ... < 200 DM | 24 | existing credits paid back duly till now | car (used) | 12579 | ... < 100 DM | ... >= 7 years | 4 | male : divorced/separated | none | 2 | unknown / no property | 44 | none | for free | 1 | management/ self-employed/ highly qualified employee/ officer | 1 | yes, registered under the customers name | yes | bad |
19 | no checking account | 24 | existing credits paid back duly till now | radio/television | 3430 | 500 <= ... < 1000 DM | ... >= 7 years | 3 | male : divorced/separated | none | 2 | car or other, not in attribute Savings account/bonds | 31 | none | own | 1 | skilled employee / official | 2 | yes, registered under the customers name | yes | good |
数值型变量:数据类型、缺失率、唯一值、均值、标准差、分位数等,
分类型变量:数据类型、缺失率、唯一值、top1(占比第一的数据类)等。
type | size | missing | unique | mean_or_top1 | std_or_top2 | min_or_top3 | 1%_or_top4 | 10%_or_top5 | 50%_or_bottom5 | 75%_or_bottom4 | 90%_or_bottom3 | 99%_or_bottom2 | max_or_bottom1 | ||
status.of.existing.checking.account | category | 1000 | 0.00% | 4 | no checking account:39.40% | ... < 0 DM:27.40% | 0 <= ... < 200 DM:26.90% | ... >= 200 DM / salary assignments for at least 1 year:6.30% | no checking account:39.40% | ... < 0 DM:27.40% | 0 <= ... < 200 DM:26.90% | ... >= 200 DM / salary assignments for at least 1 year:6.30% | |||
duration.in.month | int64 | 1000 | 0.00% | 33 | 20.903 | 12.05881445 | 4 | 6 | 9 | 18 | 24 | 36 | 60 | 72 | |
credit.history | category | 1000 | 0.00% | 5 | existing credits paid back duly till now:53.00% | critical account/ other credits existing (not at this bank):29.30% | delay in paying off in the past:8.80% | all credits at this bank paid back duly:4.90% | no credits taken/ all credits paid back duly:4.00% | existing credits paid back duly till now:53.00% | critical account/ other credits existing (not at this bank):29.30% | delay in paying off in the past:8.80% | all credits at this bank paid back duly:4.90% | no credits taken/ all credits paid back duly:4.00% | |
purpose | object | 1000 | 0.00% | 10 | radio/television:28.00% | car (new):23.40% | furniture/equipment:18.10% | car (used):10.30% | business:9.70% | education:5.00% | repairs:2.20% | domestic appliances:1.20% | others:1.20% | retraining:0.90% | |
credit.amount | int64 | 1000 | 0.00% | 921 | 3271.258 | 2822.736876 | 250 | 425.83 | 932 | 2319.5 | 3972.25 | 7179.4 | 14180.39 | 18424 | |
savings.account.and.bonds | category | 1000 | 0.00% | 5 | ... < 100 DM:60.30% | unknown/ no savings account:18.30% | 100 <= ... < 500 DM:10.30% | 500 <= ... < 1000 DM:6.30% | ... >= 1000 DM:4.80% | ... < 100 DM:60.30% | unknown/ no savings account:18.30% | 100 <= ... < 500 DM:10.30% | 500 <= ... < 1000 DM:6.30% | ... >= 1000 DM:4.80% | |
present.employment.since | category | 1000 | 0.00% | 5 | 1 <= ... < 4 years:33.90% | ... >= 7 years:25.30% | 4 <= ... < 7 years:17.40% | ... < 1 year:17.20% | unemployed:6.20% | 1 <= ... < 4 years:33.90% | ... >= 7 years:25.30% | 4 <= ... < 7 years:17.40% | ... < 1 year:17.20% | unemployed:6.20% | |
网站声明:如果转载,请联系本站管理员。否则一切后果自行承担。
加入交流群
请使用微信扫一扫!