def calculateIV(train_data,label_columnName):
'''
@description
@param label_columnName: column name of label
@return
train_data: pd.DataFrame,include label
test_data: pd.DataFrame
'''
import math
print("calculate IV")
# WOE Encode For category column
columns1 = [i for i in train_data.columns if i != label_columnName] # column names except label column
# calculate IV value for category column
IV_value = dict()
for col in columns1
pandas 计算IV值方法
最新推荐文章于 2024-01-21 17:04:37 发布