What Is the “Bagging” Ensemble Method?

Mehmet Akturk
3 min readMar 1, 2021

This series(“Bagging & Boosting Ensemble Methods and What is the Difference Between Them?”) consists of 6 separate articles and is the third article in this series. In this part, we will talk about “What is the “Bagging” Ensemble Method”.

https://www.educba.com/bagging-and-boosting/

In fact, we can see that the bagging method, as we have selected above, gives us visually what it tries to explain. But let’s try to explain the idea behind it.

Behind idea in bagging is to combine the results of multiple models (eg all decision trees) to produce a more general result.

The ones that come to mind are:

  • Would it be useful if you create and merge all models on the same dataset?
  • Since they take the same input, these models have a high chance of producing the same result.
  • How can solve this problem?

Bootstrapping technique:

We can call this method a sampling technique that we create by changing subsets of observations from the original data set. With subsets, it is the same size as the original set.

Bagging technique:

The Bootstrapping and Bagging technique uses these subsets to get a fair idea of the whole set. The size of the subsets generated for bagging may be less than the original set.

https://www.slideshare.net/mlvlc/l4-ensembles-of-decision-trrees
  1. Multiple subsets(samples) are created from the original dataset(super population), selecting observations with replacement.
  2. A base model (weak model) is created on each of these subsets.
  3. The models run in parallel and are independent of each other.
  4. The final predictions are determined by combining the predictions from all the models.
https://upload.wikimedia.org/wikipedia/commons/6/6b/Bagging.png

What are the pros and cons shortly:

https://dataaspirant.com/ensemble-methods-bagging-vs-boosting-difference/#t-1599488265671

If you want to see an example of how the bagging algorithm works, you can look at the algorithms of Random Forest and other models in my notebooks on my Kaggle page.

Let me put a stop to our topic here and say we will see you in our next topic, What Is the “Boosting” Ensemble Method?.

http://www.plusxp.com/2011/02/back-to-the-future-the-game-episode-1-review/

References
1. https://www.educba.com/bagging-and-boosting/
2. https://medium.com/swlh/difference-between-bagging-and-boosting-f996253acd22
3. https://image.slidesharecdn.com/ensemblesofdecisiontrees-150917154434-lva1-app6892/95/l4-ensembles-of-decision-trees-10-638.jpg?cb=1442517797
4. https://dataaspirant.com/ensemble-methods-bagging-vs-boosting-difference/#t-1599488265671
5. https://upload.wikimedia.org/wikipedia/commons/6/6b/Bagging.png
6. https://www.kaggle.com/mathchi/notebooks
7. http://www.plusxp.com/2011/02/back-to-the-future-the-game-episode-1-review/

--

--

Mehmet Akturk

Experienced Ph.D. with a demonstrated history of working in the higher education industry. Skilled in Data Science,AI,NLP,Deep Learning,Big Data,& Mathematics.