线下woe转换 - shuiwanghuohuo/scorecard_wiki GitHub Wiki
from tool_box import card_tool as cd_tool
cd_tool.value2woe(data, filter_evidence, black_flag="label", exclude_column=[], not_in_list=["None", "NaN", "NA", "nan", None, "-999", "-999.0", -999, "-1111", "-1111.0", -1111])
将指标值转换为woe
Parameter Description
---------------------
data : pandas.core.frame.DataFrame
数据集
filter_evidence : pandas.core.frame.DataFrame
feature_select函数产生的结果(筛选你需要的列),会将这些列转换为woe
black_flag : string,(default="label")
标签列列名
exclude_column : list,(defult=[]),
要排除的列
not_in_list : list,(default=["None", "NaN", "NA", "nan",None, "-999", "-999.0", -999,"-1111","-1111.0",-1111])
空值列表,在列表中的值会被认为空值
Return
------
woe_data : 带标签列和指标列(筛选后)的dataframe