I have the following binary Decision Tree:

enter image description here

Can you please explain how can I report this tree to a person who only understands probabilities?

If ca=1 and cp_4.0=1, what’s the probability of Yes HD?


While you can calculate the underlying class probabilities from the Gini index (for binary classification), it'll be more straightforward to calculate it from the "value" line in each box. This line simply represents the number of samples that belong in each node, split by the target variable, so you can use this count to calculate a probability.

In the bottom-most node, for example, you have value = [4, 55], indicating that among 59 samples which belong in that node (samples that have ca > 0.5 and cp_4.0 > 0.5), 4 are No HD and 55 are Yes HD. Therefore, the probability of Yes HD in that node is 55/59.

The Gini index is a measure of how "pure" a node is - as this number gets closer to 0, probability values will become more extreme (closer to 0 or 1), indicating that the decision tree is doing a better job of discriminating the target variable.


Not the answer you're looking for? Browse other questions tagged or ask your own question.