January 2019
Intermediate to advanced
390 pages
9h 16m
English
The voting classifier follows the majority; it aggregates the prediction of all the classifiers and chooses the class with maximum votes. For example, in the following screenshot, the voting classifier will predict the input instance to belong to class 1:

scikit has the VotingClassifier class to implement this. Using ensemble learning on wine quality classification, we reach an accuracy score of 74%, higher than any of the models considered alone. The complete code is in the Wine_quality_using_Ensemble_learning.ipynb file. The following is the main code to perform ensemble learning using voting:
# import the different classifiers ...
Read now
Unlock full access