amphibian-dev / toad

ESC Team's credit scorecard tools.
https://toad.readthedocs.io
MIT License
474 stars 173 forks source link

为什么教程里的demo都跑不通呢 #133

Open bailixuance opened 9 months ago

bailixuance commented 9 months ago

参考使用教程toad使用教程,进行特征筛选时报错。 代码:

train_selected, dropped = toad.selection.select(train,target = 'target', empty = 0.5, iv = 0.05, corr = 0.7, return_drop=True, exclude=['APP_ID_C','month'])
print(dropped)
print(train_selected.shape)

报错内容:

ValueError: could not convert string to float: 'RESIDENT INDIAN'

toad 版本是:0.1.2

这个问题也太低级了吧

Secbone commented 9 months ago

@bailixuance 抱歉,这个问题是由于新版本的 pandas 更新后有参数变更,这部分测试用例没有覆盖导致没有及时发现。 目前已修复此问题并已添加测试用例,在新版本 0.1.3 中已可用,可以升级后再试一下

bailixuance commented 9 months ago

我的pandas 确实是 2.0.3 的,不过在安装toad==0.1.3时有出新的问题:

  1. python 3.9 安装0.1.2、0.1.3 均编译失败
  2. python 3.8 仅0.1.2安装成功,0.1.3失败 详情见 #134

@bailixuance 抱歉,这个问题是由于新版本的 pandas 更新后有参数变更,这部分测试用例没有覆盖导致没有及时发现。 目前已修复此问题并已添加测试用例,在新版本 0.1.3 中已可用,可以升级后再试一下