liveBook · Manning

Mode

As explained in Grokking Machine Learning

A prediction aggregation rule that selects the class receiving the greatest number of learner votes.

When several classifiers give different answers, choose the class predicted by the greatest number of learners. This is the mode of their predictions; if classes tie, choose randomly. section 12.1

Three tree votes

For an input, three depth-1 decision trees each predict 0 or 1. The combined classifier returns whichever value receives more votes. section 12.2

Figure 12.6 The way to obtain the predictions of the random forest is by combining the predictions of the three weak learners. On the top, we can see the three boundaries of the decision trees from figure 12.5. On the bottom, we can see how the three decision trees vote to obtain the boundary of the corresponding random forest.

Compare the individual tree boundaries with the combined boundary formed by their votes. section 12.2

How Grokking Machine Learning covers it

How deep it goes
Defines the most-common-class rule and notes random tie-breaking, without deriving a formula.
Examples
Uses three depth-1 decision trees and spam-versus-ham email data.
What you can do after
Apply the rule by selecting the class receiving the most learner predictions.
How it connects
Links voting to bagging, boosting, and random forests.

Also explained in

Compare how 8 books explain mode →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Machine Learning. The section links point to the parts of the book it draws on.