Majority Vote
noun
say it: “muh-JOR-ih-tee VOHT” /məˈdʒɔrəti ˈvoʊt/
A decision made by choosing the option that more voters chose than any other.
What is a majority vote in machine learning?
A majority vote picks the answer most of a group chose. k-nearest neighbors gives a new example the label most of its k neighbors share, and a random forest takes the class most of its trees picked.
from collections import Counter
neighbors = ["lemon", "orange", "lemon"]
print(Counter(neighbors).most_common(1)[0][0]) # lemon: 2 votes to 1
In a sentence
- “The majority vote of the three nearest fruits was lemon.”
- “A random forest's answer is the majority vote of its trees.”
Level: Apprentice · More AI Basics terms at this level
Updated