Classification accuracy counts correct predictions; a margin measures how decisively a forest favors an observation’s known class over its strongest incorrect competitor. For B trees and a labeled observation (x, y), it is the fraction voting for y minus the largest fraction voting for any other class. section 9.4.1
The first term counts votes for the known class; the second subtracts the strongest competing class’s vote share. section 9.4.1
A positive margin means the known class leads; zero means a tie; a negative margin means a misclassification. Magnitude indicates how far the vote is from reversing the result. Across labeled observations, the distribution of margins links individual vote patterns to forest-wide error. section 9.4.1
The forest’s classification error is the probability that a labeled observation has a negative margin. section 9.4.1
Two correct predictions, different confidence
With 100 trees, votes of 82 for A, 12 for B, and 6 for C give a margin of 0.70. Votes of 51 for A and 49 for B give 0.02: both predictions are correct, but the latter is much closer to reversal. section 9.4.1
