Closed kennethverstraete closed 4 years ago
The error seems to reproduce using scikit-learn 0.22 or later. Could you try XGBoost 1.x with scikit-learn 0.21.3?
xgboost 1.0.1 did not reproduce the error with scikit-learn 0.21.3 in my environment.
Indeed, no error with sklearn 0.21.3 and an error with 0.22 or later!
The entire error: `--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last)
Indeed, no error with sklearn 0.21.3 and an error with 0.22 or later!
Great!
I'm afraid that, at this moment, I do not plan to fix the issue with scikit-learn 0.22 because I'm not sure how to fix it and I haven't found any new features of scikit-learn 0.22 useful for CausalLift. Pull requests are welcome though.
I installed the newest release of causallift and xgboost (version 1.0.2) and the function estimate_cate_by_2_models() gives a RunTimeError now:
RuntimeError: Cannot clone object XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1, colsample_bynode=None, colsample_bytree=1, gamma=0, gpu_id=None, importance_type='gain', interaction_constraints=None, learning_rate=0.1, max_delta_step=0, max_depth=3, min_child_weight=1, missing=None, monotone_constraints=None, n_estimators=100, n_jobs=-1, nthread=None, num_parallel_tree=None, objective='binary:logistic', random_state=0, reg_alpha=0, reg_lambda=1, scale_pos_weight=1, subsample=1, tree_method=None, validate_parameters=False, verbose=0, verbosity=None), as the constructor either does not set or modifies parameter missing
When I use an older version of xgboost (version 0.90 like in the example notebook), it works again. An API change in version 1.0.0 of xgboost maybe?