Skip to content

Releases: encyc/yihuier

v0.2.2 - ChiMerge Bug Fix & PSI Calculation

29 Apr 01:27

Choose a tag to compare

修复

ChiMerge 分箱

  • 修复 col_map 列名错误导致的分箱失败
  • 修复重复分箱边界问题 (bins must increase monotonically)
  • 修正包目录名大小写问题

PSI 计算

  • 新增 ScorecardMonitorModule.calculate_psi() 方法
  • 支持直接传入分数数组计算 PSI
  • Yihuier 类新增 sm_module 属性

使用示例

from yihuier import Yihuier

yh = Yihuier(data, target='target')

# ChiMerge 分箱(现在可用)
bin_df, iv_value = yh.binning_module.binning_num(
    col_list=vars, max_bin=5, method='ChiMerge'
)

# PSI 计算(新增)
psi = yh.sm_module.calculate_psi(train_scores, test_scores)
psi_detail = yh.sm_module.calculate_psi(train_scores, test_scores, return_detail=True)