Calculation Results
Complete the form to calculate bagging statistics.
Estimator Details
| Estimator | Requested | Unique | Duplicates | OOB | Unique % | OOB % | Seed | Sample IDs |
|---|
Class Sampling Results
| Class | Original Count | Original % | Expected Sampled | Expected OOB | Sampled % |
|---|
Feature Bagging Results
Charts
In-Bag Composition
Coverage by Estimator Count
Selection Frequency
Theoretical versus Simulated
Configuration Comparison
| Configuration | Sample Size | Unique | Duplicates | OOB | Coverage | Total Draws |
|---|
Calculation History
No saved calculations yet.
Formula Used
How to Use
Enter the dataset size and estimator count. Choose sample units and replacement rules. Then select a sampling strategy.
Add class counts for classification analysis. Configure feature sampling and simulation options. Press calculate to generate all results.
Use comparison mode for alternative settings. Export the table when needed. Review warnings before using production assumptions.
Example Data
| Setting | Example | Meaning |
|---|---|---|
| Dataset size | 1,000 | Available training observations |
| Estimators | 100 | Base learners in the ensemble |
| Sample size | 100% | One bootstrap draw per original record |
| Replacement | With replacement | Repeated observations are allowed |
| Expected unique | About 632 | Roughly 63.2% for large datasets |
Bagging Concepts
Bagging trains models on resampled datasets. Each model sees a different training view. Their combined predictions usually reduce variance.
Bootstrap sampling allows repeated observations. Unselected observations become out-of-bag records. These records support convenient validation estimates.
Subsampling removes replacement and duplicates. Balanced sampling adjusts class representation. Feature bagging increases model diversity further.
Frequently Asked Questions
Why does full bootstrap sampling contain about 63.2% unique records?
Each draw can repeat earlier observations. The probability of exclusion approaches 36.8%. Therefore unique coverage approaches approximately 63.2%.
What are out-of-bag observations?
They are records excluded from one estimator's sample. They can test that estimator. Aggregated OOB predictions estimate generalisation performance.
Can sample size exceed dataset size?
Yes, when sampling uses replacement. Repeated records make larger samples possible. Without replacement, sample size cannot exceed N.
Does bagging always improve accuracy?
No, improvement depends on model diversity. Strongly correlated models gain less. Stable learners may benefit less than unstable learners.
How does balanced bagging work?
It changes class sampling probabilities. Minority classes receive more representation. Majority classes may be reduced or weighted.
What is feature bagging?
Each estimator uses a feature subset. This reduces correlation between models. Random forests commonly use this approach.
What is pasting?
Pasting samples observations without replacement. It prevents duplicate records inside estimators. It still creates diverse training subsets.
Why use a random seed?
A seed makes simulations repeatable. Matching seeds reproduce identical samples. This supports testing and auditing.
How should simulation runs be chosen?
More runs stabilise simulated averages. Large datasets increase browser workload. Start small and increase carefully.