Data Science

How to calculate class probability in a classification tree?

For each leaf in the tree count the ration of the occurrence of a target variable.
 
E.g. n = yes, m = no
 
class probability of yes:
 
n/(n+m)

Diskussion