0
$\begingroup$

Due to the way that decision trees work, do random forest classifiers always get 100% accuracy on their own training data? My random forest classifier got 100% accuracy on its own training data, so I'm not sure if this is a fluke or if there is a logical reason for this. The model got 99.4% accuracy on its testing data, so it may have just had high accuracy in general.

$\endgroup$

1 Answer 1

1
$\begingroup$

No, random forest is not guaranteed to get 100% accuracy on the test data. But it also doesn’t mean it’s overfit because relatively high scores on test data are common with random forests.

The trees of a random forest are trained to leaf purity. BUT, they are only trained on a subset of the samples/features. A pure decision tree rarely generalizes well so samples not in a given tree's subset of the training samples might be wrong. The voting mechanism of random forest tends to even out all of the mistakes and provide a good score but a sample in a training set may be so misrepresented by enough decision trees to outweigh the correct votes resulting in an incorrect prediction.

$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .