grf-labs / grf

Generalized Random Forests
https://grf-labs.github.io/grf/
GNU General Public License v3.0
938 stars 250 forks source link

Access to value of criterion for splits #1414

Open n-ihlo opened 1 month ago

n-ihlo commented 1 month ago

I'm interested in the structure of Causal Forests, and especially in the criteria used to select the splits. With get_tree I was able to access the structure, but this does not seem to include this criterion (or something similar like an impurity). Is it possible to get the value of the criterion for a split?

erikcs commented 1 month ago

Hi @n-ihlo, grf doesn't store the value of the criterion it uses to determine splits. Causal forest does CART splits on an appropriate "pseudo-outcome". All the information needed to reconstruct this pseudo-outcome is available in a fit forest. If you want to learn more about the criterion causal forest use, you could have a look at the grf paper which explains how CART splitting can be paired with influence functions to target heterogeneity in a variety of statistical parameters, such as treatment effects.