Reputation: 41
I have two classifiers in a Voting Classifier which are both being used to predict whether an instance is class 0 or class 1. The results are aggregated using hard voting (which uses a majority vote), however I am unsure how the VotingClassifier makes the decision with an even number of classifiers.
Upvotes: 3
Views: 1648
Reputation: 36599
Its mentioned in the documentation here
In the cases of a tie, the VotingClassifier will select the class based on the ascending sort order. E.g., in the following scenario
classifier 1 -> class 2 classifier 2 -> class 1
the class label 1 will be assigned to the sample.
So as explained here, in case of a tie, the alphabetical order will be used to give out the result.
Upvotes: 2