O'Reilly logo

Python for Data Science For Dummies by Luca Massaron, John Paul Mueller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 20

Understanding the Power of the Many

In This Chapter

arrow Understanding how a decision tree works

arrow Using Random Forest and other bagging techniques

arrow Taking advantage of the most performing ensembles by boosting

In this chapter, you go beyond the single machine-learning models you’ve seen until now and explore the power of ensembles, groups of models that can outperform single models. Ensembles work like the collective intelligence of crowds, using pooled information to make better predictions. The basic idea is that a group of nonperforming algorithms can produce better results than a single well-trained model.

Maybe you’ve participated in one of those games that ask you to guess the number of sweets in a jar at parties or fairs. Even though a single person has a slim chance of guessing the right number, various experiments have confirmed that if you take the wrong answers of a large number of game participants and average them, you can get close to the right answer! Such incredible shared group knowledge (the wisdom of crowds) is possible because wrong answers tend to distribute around the true one. By taking a mean or median of these wrong answers, you get the direction of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required