首页 > 解决方案 > 熊猫数据转换为对象的 numpy dtype

问题描述

我正在尝试使用 uber 库来构建隆起树。 https://github.com/uber/causalml/blob/master/examples/feature_selection.ipynb

这是一个通过 Fisher 标准选择特征的示例

filter_f = FilterSelect()

method = 'F'
f_imp = filter_f.get_importance(df, X_names, y_name, method, 
                      treatment_group = 'treatment1')
print(f_imp)

当我尝试执行它时,我得到了错误

在此处输入图像描述

也许有人已经有这个问题?

我也检查dfobject,但object类型只有treatment_group_key在示例中

标签: pythonpandasdataframecausalml

解决方案


推荐阅读