Analysis results
Run the calculator to identify efficient ensemble sizes.
| Rank | Configuration | Recommended trees | Minimum error | Final error | Improvement | Gap | Assessment |
|---|
| Configuration | Trees | Primary error | Marginal reduction | Cumulative reduction | Generalisation gap | Selection status |
|---|
Interactive error curve
Formula used
Error rate equals one minus classification accuracy. The generalisation gap subtracts training error from validation error. Marginal improvement measures error reduction after adding more trees.
Error Rate = 1 - Accuracy Generalisation Gap = Validation Error - Training Error Marginal Improvement(t) = Error(t-1) - Error(t) Percentage Improvement = ((Initial Error - Current Error) / Initial Error) × 100 RMSE = sqrt(mean((Actual - Predicted)²))
How to use
- Select the model, task, metric, and primary series.
- Enter error curves or observation-level prediction data.
- Choose the optimal-tree rule and analysis tolerances.
- Adjust smoothing, scales, series, and chart annotations.
- Run the analysis and review recommended tree counts.
- Export the source, results, chart, or PDF report.
Worked example
| Trees | Training error | Validation error | Test error | OOB error |
|---|---|---|---|---|
| 10 | 0.185 | 0.221 | 0.229 | 0.224 |
| 50 | 0.098 | 0.143 | 0.151 | 0.146 |
| 100 | 0.061 | 0.126 | 0.132 | 0.129 |
| 200 | 0.038 | 0.124 | 0.130 | 0.126 |
The validation curve improves quickly before flattening near 100 trees. Later trees offer little benefit and increase computational cost. A tolerance rule may select the earlier efficient point.
Interpretation notes
Random forests often stabilize without severe overfitting. Boosting models may overfit after excessive iterations. Always preserve test data for final evaluation only.
Confidence bands reveal variability across folds or repeated runs. Wide bands indicate unstable estimates or limited observations. Compare uncertainty before choosing a single minimum point.
A plateau means improvements became practically negligible. The earliest near-optimal point can reduce inference costs. Use domain constraints alongside the calculated recommendation.
Frequently asked questions
What does this plot show?
It shows error changes as ensemble trees increase. Separate curves can represent training, validation, testing, or OOB data. The shape helps identify efficient model complexity.
Should I always choose the minimum error?
No, tiny improvements may not justify additional trees. Tolerance and one-standard-error rules favor simpler choices. Consider latency, memory, and training cost together.
What is out-of-bag error?
OOB error uses samples excluded from individual bootstrap draws. It estimates generalisation without a separate validation split. It is most relevant for bootstrap-based ensembles.
How is overfitting detected?
The calculator compares training and primary error trends. Falling training error with rising validation error suggests overfitting. This rule is diagnostic rather than definitive.
What is the one-standard-error rule?
It finds models statistically close to the minimum. The earliest qualifying tree count is selected. This approach usually favors simpler, more stable ensembles.
Can I compare several configurations?
Yes, use different names in the configuration column. Each configuration receives its own curves and summary. The ranking table compares their recommended operating points.
Why does the curve fluctuate?
Sampling noise and random seeds can cause variation. Cross-validation averages and smoothing reveal broader trends. Never hide meaningful instability using excessive smoothing.
Can percentages be entered?
Yes, choose percentage input before analyzing data. The calculator converts percentages into decimal error values. Exports preserve normalized decimal calculations for consistency.
Can prediction rows be converted into errors?
Yes, choose observation-level prediction input mode. The selected metric is calculated for every tree count. Split and fold columns create comparable series.