uber / causalml

Uplift modeling and causal inference with machine learning algorithms
Other
4.87k stars 756 forks source link

Expose leaf sizes for `honestApproach` trees (or update `nodeSummary`s) #736

Closed IanDelbridge closed 2 months ago

IanDelbridge commented 4 months ago

Is your feature request related to a problem? Please describe. I'm trying to develop confidence measures from fitted UpliftRandomForestClassifier. For this, I need to know the summary statistics of leaf nodes in an UpliftTreeClassifier after modifying the estimation via honesty=True.

Describe the solution you'd like I'd like to either update nodeSummary with the honest estimation samples when honestApproach is called or otherwise expose both the number of samples and the outcome rates for each leaf node.

Describe alternatives you've considered An alternative could be adding the counts to results and updating the calling methods.

Additional context