-
Notifications
You must be signed in to change notification settings - Fork 786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CausalRandomForestRegressor with causal_mse predicts to inf on data with nuisance #589
Comments
Note: |
More debug info: one of the trained tree seems to be bad:
After these trees are removed the predictions won't be |
Hi, thanks for the report. The issue has been fixed recently in #583. Please, reinstall the package from source. y, X, w, tau, b, e = synthetic_data(mode=1, n=10000, p=20, sigma=5.0) In causal_trees_with_synthetic_data.ipynb you will get the following result: |
Thanks. Reinstalling from source fixes the problem! |
This still happens with my real world data. Some predictions result in |
Hi. Could you please plot each tree from your fitted |
Hi, I encounter the same nan issue using CausalRandomForestRegressor for the predict. When using 'causal_mse' the nan ratio is around 10%. Using 'standard_mse' is better, but still have around 2% nan. |
BTW, seems |
Describe the bug
After training the
CausalRandomForestRegressor
with criterioncausal_mse
on data with nuisance, many of the predicted ITE values areinf
.To Reproduce
I changed the causal trees with synthetic data notebook to use data generated by
simulate_nuisance_and_easy_treatment
after training the
CausalRandomForestRegressor
with criterioncausal_mse
with the same codes:many of the predicted ITE values are
inf
.This is the case even if I change the nuisance to something simpler:
Expected behavior
Should predict to valid values.
Environment (please complete the following information):
pandas==1.5.2
,scikit-learn==1.0.2
The text was updated successfully, but these errors were encountered: