Open yfhewei opened 2 years ago
in one step ,there is a call " np.hstack" for W,X, change the data frame into array. and the latter make_column_selector require dataframe, not array. this makes the bug.
Suggest to combine the X and W using pd.concat, not np.hstack.
if direct pass estimator to the fit() of models in econml , then its OK. but if you pass a pipeline with transformer to the fit() function, then it will wrong.
in one step ,there is a call " np.hstack" for W,X, change the data frame into array. and the latter make_column_selector require dataframe, not array. this makes the bug.
but what is the fix of this then? to re-convert ndarray to dataframe?
when call ForestDRLearner, set model_regression=make_pipeline(ordinal_encoder,HistGradientBoostingClassifier()), set ordinal_encoder=make_column_transformer( (OrdinalEncoder(), make_column_selector()), remainder='passthrough')
ps.omitted some unimportant parameters.
then report error: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
ValueError Traceback (most recent call last)