Solved – How does the voting work in a random forest

cartensemble learningrrandom forest

I'm following this tutorial about random forest and the first figure shows three decision trees. The author states that

Tree one and two would vote that she survived, but tree three votes
that she perishes. If we take a vote, it’s 2 to 1 in favour of her
survival, so we would classify this passenger as a survivor.

But I can't see this from the trees. It looks like there's a higher percentage in each of the leaves that classify the passenger as dead i.e. those with a 0.

Best Answer

Some explanation of how to read the trees would have helped that tutorial out considerably. The key is to realize that if the statement is true, you go down the left branch.

  1. In the leftmost tree, the passenger class (1) is not $\geq 2.5$ so you go down the right branch which votes 1 (56% survive).
  2. In the center tree, the passenger is not male, so you go down the right branch which votes 1 (74% survive.)
  3. In the rightmost tree, the passenger did embark in either Q or S (Southampton) so you go down the left branch which votes 0 (34% survive.)

"Not" $\to$ "go down the right branch".