Diversity measures how differently ensemble models fail or use evidence. It strengthens ensembles because differently biased models can cancel one another’s errors. section 18.1.2
A simple ensemble
Four classifiers predict validation examples, and their outputs are averaged. This can improve robustness when the models are accurate but make different mistakes. section 18.1.2
preds_a = model_a.predict(x_val) #1 preds_b = model_b.predict(x_val) #1 preds_c = model_c.predict(x_val) #1 preds_d = model_d.predict(x_val) final_preds = 0.25 * (preds_a + preds_b + preds_c + preds_d) #2
Average four model predictions equally as a straightforward ensemble baseline. section 18.1.2
Use diversity as a practical selection rule:
- Prefer models that are individually strong and substantially different, such as different architectures or machine-learning approaches. section 18.1.2
- Avoid combining copies of one network that differ only by initialization or training-data order; their diversity and added value are usually small. section 18.1.2
- Try tree-based methods alongside deep neural networks when the problem permits; this combination can work well in practice. section 18.1.2






