Majority voting combines classification predictions by selecting the class predicted most often—the statistical mode. Like a chorus choosing one answer, it smooths some individual-model mistakes. section 2.2.1
Apply the method as a prediction-time aggregation procedure:
- Train several base estimators, often on bootstrap-generated data replicates to create diverse models. section 2.2
- Collect each estimator’s class prediction for the same input. section 3.2.1
- Count the predicted classes and return the most frequent one. section 2.2.1
The method is an equal-weight combination scheme: with m base estimators, each receives weight 1/m. It works with homogeneous ensembles such as bagging and heterogeneous collections of strong learners. section 3.2.1
Combining predictions in Python
A simple implementation gathers individual predictions, applies scipy.stats.mode across estimators, and reshapes the result into the final prediction vector. Accuracy can then be measured with sklearn.metrics.accuracy_score; one demonstrated ensemble has a test error of 6.19%. section 3.2.1
Figure 3.8 Combining by majority voting. Bagging can be viewed as a simple weighting method applied to a homogeneous ensemble. All classifiers have equal weights, and the combination function is the majority vote. We can adopt the majority voting strategy for heterogeneous ensembles as well.
Shows majority voting as equal weighting applied to both homogeneous and heterogeneous ensembles. section 3.2.1







