Abstract
Random Forests (RF) are widely regarded as robust, "off-the-shelf" classifiers that require minimal tuning. This paper challenges this convention by demonstrating that rigorous model selection can significantly enhance generalization performance. By optimizing often-neglected hyperparameters—such as bootstrap sample size ($b$), the number of random predictors ($n_v$), and tree depth ($n_l$)—and employing an exponential weighting strategy ($W_3$), researchers can achieve substantially lower error rates across a variety of classification tasks. Our findings suggest that the standard RF configuration is rarely optimal and that systematic tuning offers a "free" performance boost during the inference phase.
Introduction
Random Forests have become a staple in machine learning due to their ease of use and competitive performance. However, many practitioners treat them as a black box, adjusting only the number of trees ($n_t$). This approach overlooks the critical trade-off between the accuracy of individual trees and the correlation between them. If trees are too similar, the ensemble gains little; if they are too weak, the collective output is noisy. This study investigates a formal Model Selection (MS) procedure to identify the optimal "sweet spot" for these parameters.
Methodology
The authors utilize a Bootstrap (BOO) Model Selection procedure to optimize three primary hyperparameters: the fraction of samples for bootstrap ($b$), the number of predictors per split ($n_v$), and the maximum samples per leaf ($n_l$). Crucially, the study compares three weighting strategies for combining tree outputs:
- $W_1$ (Standard): Equal weighting via simple majority vote.
- $W_2$ (Log-Odds): Weighting based on the log-odds of Out-of-Bag (OOB) accuracy estimates.
- $W_3$ (Exponential): Weighting trees using an exponentially decaying function of their error ($p_i = e^{-\gamma \hat{L}(T_i)}$), where $\gamma$ is a tunable parameter.
The evaluation spans 26 benchmark datasets from the UCI Machine Learning Repository, covering both bi-class and multi-class problems. For each dataset, a training set of up to 500 samples was used to perform model selection, with the remainder reserved for testing.
Key Results and Insights
The quantitative analysis reveals that the exponential weighting strategy ($W_3$) is the most effective approach, consistently outperforming both the standard majority vote and the log-odds strategy. As shown in the results table, optimizing all parameters ("ALL") typically leads to the lowest error rates across the board.
Significant Findings:
- Superiority of $W_3$: In several instances, $W_3$ dramatically reduced error. For example, on dataset D8 (LSVT), the error rate fell from 15.79% (Standard) to 2.63% (Optimized $W_3$).
- Parameter Sensitivity: Tuning the bootstrap sample size ($b$) and the number of predictors ($n_v$) proved more impactful than adjusting tree depth ($n_l$).
- The "Good Enough" Trap: While the default RF configuration ($b=1, n_v=\sqrt{n}$) is competitive, it is rarely the best choice. Model selection consistently found superior configurations.
- Inference Efficiency: While model selection increases training time, it adds zero computational overhead during classification, making it highly suitable for deployed models.
Conclusion
This research underscores that Random Forests are not truly hyperparameter-free. Systematic model selection, particularly regarding weighting strategies and subsampling parameters, can unlock significant accuracy gains. The success of the exponential weighting method ($W_3$) suggests that prioritizing high-performing trees in the ensemble is more effective than simple majority voting or standard log-odds weighting. Future work should aim to provide a deeper theoretical understanding of why specific weighting strategies excel on different data distributions.
Summary updated