Skip to content
Quantoros

Does sklearn RandomForestClassifier estimate probabilities merely by counting hard class votes from trees?

Classic MLLevel: IntermediateForest probability aggregation

Does sklearn RandomForestClassifier estimate probabilities merely by counting hard class votes from trees?

Hints
  • Inspect the per-tree output before aggregation.
  • A mixed leaf carries more than one class label.

Answer

It averages class probabilities produced by the trees. Those probabilities reflect leaf class proportions, so averaging them can differ from majority voting over hard tree labels.

Source and licence: scikit-learn 1.7.2 — ensemble · BSD-3-Clause · answer: Quantoros editorial

Related questions