0

Let us say I implemented a random forest algorithm with 20 trees using 20 random subsets of training data. and there are 4 different class labels that can be predicted. So, what exactly should be called a majority verdict. If there are a total of 20 trees then should a majority verdict require that the highest voted class label is having at least 10 votes or does it simply need to be higher than other lables. example: Total Trees = 20, Class Labels are {A,B,C,D}

Scenario 1:

A= 10 votes
B= 4 votes
C= 3 votes
D = 3 votes

Clearly,A is the winner here

Scenario 2:

A= 6 votes
B= 5 votes
C= 5 votes
D = 4 votes

Can A be called the winner here?

Nostalgic
  • 300
  • 1
  • 4
  • 18

1 Answers1

0

If you are making a hard-decision, meaning you are asked to return the best guess, then yes A is the winner.

To capture the difference between these two cases, you can consider a soft-decision system instead, where you return the winner with a confidence value. An example confidence in this case can be the ratio of votes of A. Then, the first case would be a more confident estimate than the latter

curlycharcoal
  • 191
  • 1
  • 9
  • What about factoring in the difference between the highest vote getter and the next highest one? If the difference crossed a threshold then yes the highest vote getter is the winner even if it's less than 50% – Nostalgic May 24 '20 at 20:15
  • 1
    That’s another reasonable soft-decision design. My only objection is against looking only at the top two choices instead of all. For example, that scheme regards the following two cases the same, but the kinds of confusion in them are quite different: (1) Votes = (51, 49, 0, ...), (2) Votes = (12, 10, 10, 10, 10, 10, 10, 10, 10, 8) – curlycharcoal May 24 '20 at 21:13
  • 1
    @RohitGaneshan 50% has not any special significance for more that 2 classes (with 4 classes, the baseline is 25%, not 50%); here, as long as you are confined to predict one class as outcome, it would be extremely strange to select anything else than A. You could revert to probabilistic estimations for more - see [Predict classes or class probabilities?](https://stackoverflow.com/questions/51367755/predict-classes-or-class-probabilities/51423325#51423325) But factoring differences etc as you suggest is not part of the RF algorithm (or any classifier, for that matter). – desertnaut May 24 '20 at 21:25