评分卡 - shuiwanghuohuo/scorecard_wiki GitHub Wiki

1.初始化评分卡类

from scorecard import LogisticsCard 
score_card = LogisticsCard(self,black_flag="label",
                 not_in_list=["None", "NaN", "NA", "nan", None,
                              "-999", "-999.0", -999, "-1111", "-1111.0", -1111],
                 sc_type="fraud",bottom="sklearn",standscore=600,odds=60,pdo=20)     
用于构建逻辑回归评分卡的类,可以快速,便捷的建立评分卡。

Parameter Description
---------------------
black_flag : sting,(default="label")
    标签列列名

not_in_list : list,(default=["None", "NaN", "NA", "nan",None, "-999", "-999.0", -999,"-1111","-1111.0",-1111])
    空值列表,在列表中的值会被认为空值

bottom : string,(default="sklearn")
    底层,可选sklearn,statsmodels或semi(semi为半监督逻辑回归)

standscore : int,(default=600)
    在默认odds时的标准评分,默认600分

odds : standscore的好坏比,默认比例为60:1

pdo : int,(default=20)
    指odds翻倍时分数的变化,默认为20分

adjust_odds : int,(default=None)
    评分卡概率校准,目标odds(好/坏)

2.Attributes

模型训练

  LogisticsCard.fit

  LogisticsCard.bagging

模型评估

  LogisticsCard.model_validat

  LogisticsCard.model_vif

  LogisticsCard.character_psi

  LogisticsCard.score_describe