<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tushar Sonawane on Medium]]></title>
        <description><![CDATA[Stories by Tushar Sonawane on Medium]]></description>
        <link>https://medium.com/@sonawanet890?source=rss-3ad5e518f887------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*89iaUIAVsDv7-gbi</url>
            <title>Stories by Tushar Sonawane on Medium</title>
            <link>https://medium.com/@sonawanet890?source=rss-3ad5e518f887------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 06:07:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sonawanet890/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Bagging and Boosting in Machine Learning]]></title>
            <link>https://medium.com/@sonawanet890/bagging-and-boosting-in-machine-learning-8622dd952dd5?source=rss-3ad5e518f887------2</link>
            <guid isPermaLink="false">https://medium.com/p/8622dd952dd5</guid>
            <dc:creator><![CDATA[Tushar Sonawane]]></dc:creator>
            <pubDate>Tue, 13 May 2025 18:11:54 GMT</pubDate>
            <atom:updated>2025-05-13T18:13:13.745Z</atom:updated>
            <content:encoded><![CDATA[<ul><li>Bagging and boosting are two popular ensemble learning techniques used in machine learning to improve the performance of predictive models by combining multiple weaker models. In other words, they combine multiple models to produce a more stable and accurate final model compared to a single classifier. They aim to decrease the bias and variance of a model (with the end goal of having low bias and modest variance to model the nuances of the training data, while not underfitting/overfitting it). While they have similar goals, they differ in their approach and how they create the ensemble.</li><li>Bagging helps to decrease the model’s variance.</li><li>Boosting helps to decrease the model’s bias.</li><li>Ensemble learning is a powerful approach that combines multiple models to improve the predictive performance of machine learning algorithms. By leveraging the diversity of these models, ensemble learning helps mitigate the issues of bias, variance, and noise commonly encountered in individual models. It achieves this by training a set of classifiers or experts and allowing them to vote or contribute to the final prediction or classification.</li></ul><h4>Bagging :-</h4><ul><li>Bagging, short for Bootstrap Aggregation, is a straightforward yet powerful ensemble method. It applies the bootstrap procedure to high-variance machine learning algorithms, typically decision trees. The idea behind bagging is to combine the results of multiple models, such as decision trees, to obtain a more generalized and robust prediction. It creates subsets (bags) from the original dataset using random sampling with replacement, and each subset is used to train a base model or weak model independently. These models run in parallel and are independent of each other.</li><li>The final prediction is determined by combining the predictions from all the models, often through averaging or majority voting.</li></ul><h4>Boosting :-</h4><ul><li>Boosting is a sequential process where each subsequent model attempts to correct the errors made by the previous model. Unlike bagging, boosting involves training learners sequentially, with early learners fitting simple models to the data and subsequent learners analyzing the data for errors. The goal is to solve for net error from the prior model by adjusting the weights assigned to each data point. Boosting assigns higher weights to misclassified data points, so subsequent learners focus more on these difficult cases.</li><li>Through this iterative process, boosting aims to convert a collection of weak learners into a stronger and more accurate model. The final model, often referred to as a strong learner, is a weighted combination of all the models.</li></ul><h4>Weighted data elements :-</h4><ul><li>Now, we know the main difference between the two methods.</li><li>While the training stage is parallel for Bagging (i.e., each model is built independently), Boosting builds the new learner in a sequential way as follows:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*eIo8uCjo6Pz0nKmh.png" /></figure><ul><li>In Boosting algorithms each classifier is trained on data, taking into account the previous classifiers’ success.</li><li>After each training step, the weights are redistributed. Misclassified data increases its weights to emphasise the most difficult cases.</li><li>In this way, subsequent learners will focus on them during their training.</li></ul><h4>Bagging vs. Boosting :-</h4><ul><li>Bagging and Boosting are both ensemble learning techniques used to improve the performance of machine learning models. However, they differ in their approach and objectives. Here are the key differences between Bagging and Boosting :-</li><li><strong>Data Sampling :-</strong></li><li>Bagging : In Bagging (short for Bootstrap Aggregating), multiple training datasets are created by randomly sampling from the original dataset with replacement. Each dataset is of the same size as the original dataset.</li><li>Boosting : In Boosting, the training datasets are also created by random sampling with replacement. However, each new dataset gives more weight to the instances that were misclassified by previous models. This allows subsequent models to focus more on difficult cases.</li><li><strong>Model Independence :-</strong></li><li>Bagging : In Bagging, each model is built independently of the others. They are trained on different subsets of the data and can be constructed in parallel.</li><li>Boosting : In Boosting, models are built sequentially. Each new model is influenced by the performance of previously built models. Misclassified instances are given higher weights, and subsequent models try to correct those errors.</li><li><strong>Weighting of Models :-</strong></li><li>Bagging : In Bagging, all models have equal weight when making predictions. The final prediction is often obtained by averaging the predictions of all models or using majority voting.</li><li>Boosting : In Boosting, models are weighted based on their performance. Models with better classification results are given higher weights. The final prediction is obtained by combining the weighted predictions of all models.</li><li><strong>Objective :-</strong></li><li>Bagging : Bagging aims to reduce the variance of a single model. It helps to improve stability and reduce overfitting by combining multiple models trained on different subsets of the data.</li><li>Boosting : Boosting aims to reduce the bias of a single model. It focuses on difficult instances and tries to correct the model’s mistakes by giving more weight to misclassified instances. Boosting can improve the overall accuracy of the model but may be more prone to overfitting.</li><li><strong>Examples :-</strong></li><li>Bagging : Random Forest is an extension of Bagging that uses decision trees as base models and combines their predictions to make final predictions.</li><li>Boosting : Gradient Boosting is a popular Boosting algorithm that sequentially adds decision trees to the model, with each new tree correcting the mistakes of the previous ones.</li><li>The image below is an illustrated example of bagging and boosting.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*2mMwkgtf__FJqrEA.png" /></figure><h4>Selecting the best technique- Bagging or Boosting :-</h4><ul><li>Now, the question may come to our mind — whether to select Bagging or Boosting for a particular problem.</li><li>It depends on the data, the simulation and the circumstances.</li><li>Bagging and Boosting decrease the variance of your single estimate as they combine several estimates from different models. So the result may be a model with higher stability.</li><li>If the problem is that the single model gets a very low performance, Bagging will rarely get a better bias. However, Boosting could generate a combined model with lower errors as it optimizes the advantages and reduces pitfalls of the single model.</li><li>By contrast, if the difficulty of the single model is over-fitting, then Bagging is the best option. Boosting for its part doesn’t help to avoid over-fitting.</li><li>In fact, this technique is faced with this problem itself. For this reason, Bagging is effective more often than Boosting.</li></ul><h4>Similarities between Bagging and Boosting :-</h4><ol><li>Both are ensemble methods to get N learners from 1 learner.</li><li>Both generate several training data sets by random sampling.</li><li>Both make the final decision by averaging the N learners (or taking the majority of them i.e. Majority Voting).</li><li>Both are good at reducing variance and provide higher stability.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8622dd952dd5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>