matheusfacure / python-causality-handbook

Causal Inference for the Brave and True. A light-hearted yet rigorous approach to learning about impact estimation and causality.
https://matheusfacure.github.io/python-causality-handbook/landing-page.html
MIT License
2.61k stars 456 forks source link

Ch 17 - intuition #326

Closed maswiebe closed 1 year ago

maswiebe commented 1 year ago

I think you should give more intuition for the gradient boosting model results in this graph:

image

For the region model, you're estimating the net value by region. But for the gradient boosting model, are you estimating it by subsets of feature space (Age X Income X Region)?

matheusfacure commented 1 year ago

In both cases you are estimating the net value by groups. For the prediction model, the groups are defined by the model's prediction. Next, you use those net values estimates to set up a policy. For the prediction model, this simply means treating the regions where prediction>0. Doing this gives the blue histogram.