{"id":1119,"date":"2020-09-07T17:18:01","date_gmt":"2020-09-07T17:18:01","guid":{"rendered":"https:\/\/data-science.gotoauthority.com\/2020\/09\/07\/ensemble-methods-bagging-vs-boosting-difference\/"},"modified":"2020-09-07T17:18:01","modified_gmt":"2020-09-07T17:18:01","slug":"ensemble-methods-bagging-vs-boosting-difference","status":"publish","type":"post","link":"https:\/\/wealthrevelation.com\/data-science\/2020\/09\/07\/ensemble-methods-bagging-vs-boosting-difference\/","title":{"rendered":"Ensemble Methods | Bagging Vs Boosting Difference"},"content":{"rendered":"<div id=\"tve_editor\" data-post-id=\"5400\">\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-17468f00fc6\"><span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i1.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/1-Bagging-Vs-Boosting.png?resize=613%2C345&amp;ssl=1\" class=\"tve_image wp-image-5403\" alt=\"Bagging Vs Boosting\" data-id=\"5403\" width=\"613\" data-init-width=\"1920\" height=\"345\" data-init-height=\"1080\" title=\"Bagging Vs Boosting\" loading=\"lazy\" data-width=\"613\" data-height=\"345\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5403\" alt=\"Bagging Vs Boosting\" data-id=\"5403\" width=\"613\" data-init-width=\"1920\" height=\"345\" data-init-height=\"1080\" title=\"Bagging Vs Boosting\" loading=\"lazy\" src=\"https:\/\/i1.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/1-Bagging-Vs-Boosting.png?resize=613%2C345&amp;ssl=1\" data-width=\"613\" data-height=\"345\" data-recalc-dims=\"1\"><\/span><\/div>\n<div class=\"thrv_wrapper thrv_text_element tve-froala fr-box fr-basic\">\n<p dir=\"ltr\">In the world of machine learning, ensemble learning methods are the most popular topics to learn. These ensemble methods have been known as the <strong>winner<\/strong> <strong>algorithms<\/strong>. In the data science competitions platform like <a href=\"https:\/\/dataaspirant.com\/most-popular-kaggle-competition-solutions\/\" target=\"_blank\" class=\"tve-froala\" rel=\"noopener noreferrer\"><strong>Kaggle<\/strong><\/a><strong>, machinehack, HackerEarth<\/strong> ensemble methods are getting hype as the top-ranking people in the leaderboard are frequently using these methods like bagging methods and boosting methods.<\/p>\n<p dir=\"ltr\">For the data scientist roles, in interviews the <strong>difference<\/strong> between bagging and boosting most frequently asked question.\u00a0<\/p>\n<p dir=\"ltr\">So in this article, we are going to learn different kinds of ensemble methods. In particular, we are going to focus more on Bagging and boosting approaches. First, we will walk through the required basic concepts. Later we will learn in-depth about these methods.\u00a0<\/p>\n<p dir=\"ltr\">Before we drive further, below is the list of concepts you are going to learn in this article. <\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element tve-froala fr-box fr-basic\">\n<h2 id=\"t-1599488265659\" class=\"\">What is Ensemble Learning?<\/h2>\n<p dir=\"ltr\">In machine learning instead of building <a href=\"https:\/\/dataaspirant.com\/decision-tree-algorithm-python-with-scikit-learn\/\" target=\"_blank\" class=\"tve-froala\" rel=\"noopener noreferrer\">only a single model<\/a> to predict target or future, how about considering multiple models to predict the target. This is the main idea behind ensemble learning.\u00a0<\/p>\n<p dir=\"ltr\">In ensemble learning we will build multiple machine learning models using the train data, we will discuss how we are going to use the same train data to build various models in the next sections of this article.<\/p>\n<blockquote class=\"\"><p>\n<strong>So what advantage will we get with ensemble learning?<\/strong>\u00a0<\/p><\/blockquote>\n<p dir=\"ltr\">This is the primary question that will arrive in our mind.\u00a0<\/p>\n<p dir=\"ltr\">Let\u2019s pass a second here to think about what <strong>advantage<\/strong> we will get if we build multiple models.\u00a0<\/p>\n<p dir=\"ltr\">With a single model approach, if the build model is <strong>having high bias or high variance<\/strong> we will be limited to that. Even though we are having methods to <a href=\"https:\/\/dataaspirant.com\/handle-overfitting-deep-learning-models\/\" target=\"_blank\" class=\"tve-froala\" rel=\"noopener noreferrer\">handle high bias or high variance<\/a>. Still if the final is facing any of the bias or variance issues we can\u2019t do anything.<\/p>\n<p dir=\"ltr\">Whereas if we \u00a0build multiple models we can <strong>reduce<\/strong> the high variance and high bias issue by averaging all models. If the individual models are having high bias, then when we build multiple models the high bias will average out. The same is true for high variance cases too.<\/p>\n<p dir=\"ltr\">For building multiple models we are going to use the same train data.<\/p>\n<blockquote class=\"\"><p><strong>If we use the same train data, then all the build models will be also the same right?<\/strong><\/p><\/blockquote>\n<p dir=\"ltr\">But this is <strong>not<\/strong> the case.<\/p>\n<p dir=\"ltr\">We will learn how to build different models using the same train dataset. Each model will be unique to itself. We will split the available train data into multiple smaller datasets. But while creating these datasets we should follow some <strong>key properties<\/strong>. We will talk more about this in the <strong>bootstrapping<\/strong> section in this article itself.<\/p>\n<p dir=\"ltr\">For now just remember, to build multiple models we will <strong>split<\/strong> the available train data in smaller datasets. In the next steps, we will learn how to build models using the smaller datasets. One model for one smaller dataset.<\/p>\n<h4 class=\"\">In short:\u00a0<\/h4>\n<p dir=\"ltr\">The ensemble learning means instead of building a single model for prediction. We will build multiple machine learning models, we call these models as <strong>weak learners<\/strong>. A combination of all weak learners makes the strong learner, Which \u00a0generalizes to predict all the target classes with a decent amount of accuracy.<\/p>\n<h3 id=\"t-1599488265660\" class=\"\">Different Ensemble Methods\u00a0<\/h3>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-17468f57ce5\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/2-Ensemble-Learning.png?resize=613%2C381&amp;ssl=1\" class=\"tve_image wp-image-5410\" alt=\"Ensemble Learning Methods\" data-id=\"5410\" width=\"613\" data-init-width=\"1768\" height=\"381\" data-init-height=\"1098\" title=\"Ensemble Learning Methods\" loading=\"lazy\" data-width=\"613\" data-height=\"381\" data-css=\"tve-u-17468f59047\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5410\" alt=\"Ensemble Learning Methods\" data-id=\"5410\" width=\"613\" data-init-width=\"1768\" height=\"381\" data-init-height=\"1098\" title=\"Ensemble Learning Methods\" loading=\"lazy\" src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/2-Ensemble-Learning.png?resize=613%2C381&amp;ssl=1\" data-width=\"613\" data-height=\"381\" data-css=\"tve-u-17468f59047\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Ensemble Learning Methods<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element tve-froala fr-box fr-basic\">\n<p dir=\"ltr\">We are saying we will build multiple models, how these models will differ from one other. We have two possibilities.<\/p>\n<ul class=\"\">\n<li>All the models are build using the <strong>same<\/strong> machine learning algorithm<\/li>\n<li>All the models are build using <strong>different<\/strong> machine learning algorithms<\/li>\n<\/ul>\n<p dir=\"ltr\">Based on above mentioned criteria the ensemble methods are of two types.<\/p>\n<ol class=\"\">\n<li class=\" class=\">Homogeneous ensemble methods<\/li>\n<li class=\" class=\">Heterogeneous ensemble methods<\/li>\n<\/ol>\n<p dir=\"ltr\">Let\u2019s understand these methods individually.<\/p>\n<h3 id=\"t-1599488265661\" class=\"\">Homogeneous Ensemble Method<\/h3>\n<p dir=\"ltr\">The first possibility of building multiple models is building the <a href=\"https:\/\/dataaspirant.com\/category\/machine-learning-2\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>same machine learning<\/strong><\/a> model multiple times with the same available train data. Don\u2019t worry even if we are using the same training data to build the same machine learning algorithm, still all the models will be different. Will explain this in the next section.<\/p>\n<p dir=\"ltr\">These individual models are called <strong>weak learners.<\/strong><\/p>\n<p dir=\"ltr\">Just keep in mind, in the homogeneous ensemble methods all the individual models are built <strong>using the same<\/strong> machine learning algorithm.\u00a0<\/p>\n<p dir=\"ltr\">For example, if the individual model is a <strong>decision tree<\/strong> then one good example for the ensemble method is <strong>random forest.<\/strong><\/p>\n<p dir=\"ltr\">In the random forest model, we will build <strong>N different<\/strong> models. All individual models are decision tree models. If you want to learn how the decision tree and random forest algorithm works. Have a look at the below articles.<\/p>\n<p dir=\"ltr\">Both bagging and boosting belong to the <strong>homogeneous<\/strong> ensemble method.<\/p>\n<h3 id=\"t-1599488265662\" class=\"\">Heterogeneous Ensemble Method<\/h3>\n<p dir=\"ltr\">The second possibility for building multiple models is building <strong>different<\/strong> machine learning models. Each model will be different but uses the same training data.<\/p>\n<p dir=\"ltr\">Here also the individual models are called weak learners. The <strong>stacking method<\/strong> will fall under the heterogeneous ensemble method. In this article, we are mainly focusing only on the homogeneous ensemble methods. In the upcoming articles, we will learn about the staking method.\u00a0<\/p>\n<p dir=\"ltr\">For now, let\u2019s focus only on homogeneous methods.<\/p>\n<p dir=\"ltr\">By now we are clear with different types of ensemble methods. We frequently said the individual models are weak learners. So let\u2019s spend some time understanding the weak learners and strong learners. These are the building blocks for ensemble methods.<\/p>\n<h2 id=\"t-1599488265663\" class=\"\">Weak Learners Vs Strong Learners<\/h2>\n<p dir=\"ltr\">In both, homogeneous and heterogeneous ensemble methods we said the individual models are called weak learns, in the homogeneous ensemble method these weak learns are built using the same machine learning algorithms, Whereas in the heterogeneous ensemble methods these weak learns are built using different machine learning algorithms.\u00a0<\/p>\n<p dir=\"ltr\">So what do these weak learners do? Why are they more important for understanding any ensemble methods?\u00a0<\/p>\n<p dir=\"ltr\">Weak learning is the same as any <a href=\"https:\/\/dataaspirant.com\/svm-classifier-implemenation-python-scikit-learn\/\" target=\"_blank\" class=\"tve-froala\" rel=\"noopener noreferrer\">machine learning model<\/a>, unlike the strong machine learning models they won\u2019t try to generalize for all the possible target cases. The weak learners only try to predict a combination of target cases or a single target accurately.\u00a0<\/p>\n<p dir=\"ltr\">Confusing?<\/p>\n<p dir=\"ltr\">Let\u2019s understand this with an example. Before that, we need to understand about bootstrapping. Once we learn about bootstrapping, then we will take an example to understand weak learning and strong learning methodology in more detail.<\/p>\n<h3 id=\"t-1599488265664\" class=\"\">Bootstrapping<\/h3>\n<p dir=\"ltr\">For building multiple models whether it is a homogeneous or heterogeneous ensemble method the dataset is the same. <\/p>\n<blockquote class=\"\"><p><strong>So how to use the same dataset for building multiple models?<\/strong><\/p><\/blockquote>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-17468f82c64\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/4-Bootstrapping-Example.png?resize=613%2C371&amp;ssl=1\" class=\"tve_image wp-image-5415\" alt=\"Bootstrapping Example\" data-id=\"5415\" width=\"613\" data-init-width=\"2362\" height=\"371\" data-init-height=\"1430\" title=\"Bootstrapping Example\" loading=\"lazy\" data-width=\"613\" data-height=\"371\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5415\" alt=\"Bootstrapping Example\" data-id=\"5415\" width=\"613\" data-init-width=\"2362\" height=\"371\" data-init-height=\"1430\" title=\"Bootstrapping Example\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/4-Bootstrapping-Example.png?resize=613%2C371&amp;ssl=1\" data-width=\"613\" data-height=\"371\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Bootstrapping Example<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">For each model, we need to take a sample of data, but we need to be very careful while creating these samples of data. Because if we randomly take the data, in a single sample we will end up with only one target class or the target class distribution won\u2019t be the same. This will affect model performance.<\/p>\n<p dir=\"ltr\">To overcome this we need a smart way to create these samples, known as <strong>bootstrapping samples.<\/strong><\/p>\n<p dir=\"ltr\">Bootstrapping is a statistical method to create sample data without leaving the properties of the actual dataset. The individual samples of data called bootstrap samples.\u00a0<\/p>\n<p dir=\"ltr\">Each sample is an <strong>approximation<\/strong> for the actual data. These individual sample has to capture the underlying complexity of the actual data. All data points in the samples are <strong>randomly taken with replacement<\/strong>.\u00a0<\/p>\n<p dir=\"ltr\">In the above image from the actual dataset, we created <strong>3 bootstrap samples<\/strong>. In this case, we are creating an equal size sample. We <strong>don\u2019t have<\/strong> any hard rule saying all the bootstrap sample sizes should be the same.<\/p>\n<p dir=\"ltr\">In the bootstrapping properties, we said the data points will take randomly and with replacement. From the above image, the second bootstrapping sample is having a repeated data point (which is light green.)<\/p>\n<p dir=\"ltr\">Same as the above image, using the actual dataset we will create bootstrap samples. Then each bootstrap sample is used to create multiple models.<\/p>\n<p dir=\"ltr\">By now we learned how the individual sample datasets are created and we also learned these datasets are used for building the multiple weak learns. The combination of all weak learns makes a strong learner or strong model.<\/p>\n<h3 id=\"t-1599488265665\" class=\"\">Weak Learners<\/h3>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-17468fa3a6a\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/3-Weak-Learners-Exmple.png?resize=613%2C516&amp;ssl=1\" class=\"tve_image wp-image-5414\" alt=\"Weak Learners Exmple\" data-id=\"5414\" width=\"613\" data-init-width=\"1786\" height=\"516\" data-init-height=\"1504\" title=\"Weak Learners Exmple\" loading=\"lazy\" data-width=\"613\" data-height=\"516\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5414\" alt=\"Weak Learners Exmple\" data-id=\"5414\" width=\"613\" data-init-width=\"1786\" height=\"516\" data-init-height=\"1504\" title=\"Weak Learners Exmple\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/3-Weak-Learners-Exmple.png?resize=613%2C516&amp;ssl=1\" data-width=\"613\" data-height=\"516\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Weak Learners Example<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">Let\u2019s understand about weak learning with the help of the above example.<\/p>\n<p dir=\"ltr\">Week learns are the individual models to predict the target outcome. But these models are not the optimal models. In other words, we can say they are not generalized to predict accurately for all the target classes and for all the expected cases.<\/p>\n<p dir=\"ltr\">They will focus on predicting accurately only for a few cases. If you see the above example.\u00a0<\/p>\n<p dir=\"ltr\">The original dataset is having <strong>two possible<\/strong> outcomes:\u00a0<\/p>\n<p dir=\"ltr\">The above representation predicts the target circle or diamonds with some features.<\/p>\n<p dir=\"ltr\">The first learner accurately predicted the circles, the second weak learner also accurately predicting the circles. Whereas the last weak learner is accurately predicting diamonds.\u00a0 As we said before, weak learning accurately predicts one target class.<\/p>\n<p dir=\"ltr\">Combining all the weak learners makes the strong model which generalized and optimized well enough for accurately predicting all the target classes.\u00a0<\/p>\n<p dir=\"ltr\">So how do these strong learners work?<\/p>\n<h3 id=\"t-1599488265666\" class=\"\">Strong Learning<\/h3>\n<p dir=\"ltr\">We said a combination of all the weak learners builds a strong model. How do these individuals build trains at once, how do they perform the predictions?<\/p>\n<p dir=\"ltr\">Based on the way the individual models (weak learners) training phase the bagging and boosting methods will vary. <\/p>\n<h2 id=\"t-1599488265667\" class=\"\">What Is Bagging?<\/h2>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-17468fc14d3\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/5-Bagging-ensemble-method.png?resize=613%2C649&amp;ssl=1\" class=\"tve_image wp-image-5421\" alt=\"Bagging ensemble method\" data-id=\"5421\" width=\"613\" data-init-width=\"1506\" height=\"649\" data-init-height=\"1594\" title=\"Bagging ensemble method\" loading=\"lazy\" data-width=\"613\" data-height=\"649\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5421\" alt=\"Bagging ensemble method\" data-id=\"5421\" width=\"613\" data-init-width=\"1506\" height=\"649\" data-init-height=\"1594\" title=\"Bagging ensemble method\" loading=\"lazy\" src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/5-Bagging-ensemble-method.png?resize=613%2C649&amp;ssl=1\" data-width=\"613\" data-height=\"649\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Bagging Ensemble Method<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">In the bagging method, all the individual models are built <strong>parallel<\/strong>, each individual model is different from one other. In this method, all the observations in the bootstrapping sample will be treated equally. In other words, all the observations will have equal at <strong>zero weightage<\/strong>. Because of this bagging method also called <strong>bootstrap aggregating<\/strong>.<\/p>\n<p dir=\"ltr\">As a first step using the bootstrapping method, we will split the dataset into N number of samples. Then we will select the algorithm we want to try.<\/p>\n<p dir=\"ltr\">Suppose if we selected a decision tree, then each bootstrap sample will be used for building one random forest model. Don\u2019t forget all the decision trees are built in parallel.<\/p>\n<p dir=\"ltr\">Once the training phase is completed, to predict the target outcome, we will pass the observations to all the N decision trees. Each decision tree will predict one target outcome. The final prediction target will be selected based on the majority voting.<\/p>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-17468fe01fa\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i1.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/6-Bagging-majority-voting.png?resize=613%2C368&amp;ssl=1\" class=\"tve_image wp-image-5424\" alt=\"Bagging Majority Voting\" data-id=\"5424\" width=\"613\" data-init-width=\"750\" height=\"368\" data-init-height=\"450\" title=\"Bagging Majority Voting\" loading=\"lazy\" data-width=\"613\" data-height=\"368\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5424\" alt=\"Bagging Majority Voting\" data-id=\"5424\" width=\"613\" data-init-width=\"750\" height=\"368\" data-init-height=\"450\" title=\"Bagging Majority Voting\" loading=\"lazy\" src=\"https:\/\/i1.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/6-Bagging-majority-voting.png?resize=613%2C368&amp;ssl=1\" data-width=\"613\" data-height=\"368\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Bagging Majority Voting<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element tve-froala fr-box fr-basic\">\n<p dir=\"ltr\">Suppose we build <strong>10<\/strong> <strong>decision tree<\/strong> models. The target is a binary target. Let\u2019s say the target class could be 1 or 0. Then each decision tree will predict 1 or 0. Out of 10 decision trees, 8 trees are predicted as 1, and 2 trees predicted as 0 by majority voting means the final predicted class will be 1.<\/p>\n<p dir=\"ltr\">Let&#8217;s say in the above image out of 10 models 8 models are\u00a0 predicted one target class and the other 2 models predicted the other target class. So the final predicted target will be the 8 models target, this is known as majority voting.\u00a0\u00a0<\/p>\n<p dir=\"ltr\">The bagging methods can be used for both <strong>classification and regression problems<\/strong>. If we are using the bagging method of classification method, we use the majority voting approach for the final prediction. Whereas for the <a href=\"https:\/\/dataaspirant.com\/simple-linear-regression-python-without-any-machine-learning-libraries\/\" target=\"_blank\" class=\"tve-froala\" rel=\"noopener noreferrer\">regression kind of problems<\/a>, we take the average of all the values predicted by individual models.<\/p>\n<h4 class=\"\">In Short:\u00a0<\/h4>\n<\/div>\n<div class=\"thrv_wrapper thrv-page-section thrv-lp-block\" data-inherit-lp-settings=\"1\" data-css=\"tve-u-17468ffde0a\" data-keep-css_id=\"1\">\n<div class=\"tve-page-section-in tve_empty_dropzone  \" data-css=\"tve-u-17468ffe070\">\n<div class=\"thrv_wrapper thrv-columns dynamic-group-kbulxqe6\" data-css=\"tve-u-17468ffde0b\">\n<div class=\"tcb-flex-row v-2 tcb--cols--2\" data-css=\"tve-u-17468ffde0c\">\n<div class=\"tcb-flex-col\">\n<div class=\"tcb-col dynamic-group-kbulxl9a\" data-css=\"tve-u-17468ffde0d\">\n<div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box tve-elem-default-pad dynamic-group-kbulxc3q\" data-css=\"tve-u-17468ffde0e\">\n<div class=\"tve-cb\">\n<h4 class=\"\" id=\"t-1599488265668\">Pros<\/h4>\n<div class=\"thrv_wrapper thrv-styled_list dynamic-group-kbulx7a0\" data-icon-code=\"icon-check\" data-css=\"tve-u-17468ffde12\">\n<ul class=\"tcb-styled-list\">\n<li class=\"thrv-styled-list-item dynamic-group-kbulwyg8\" data-css=\"tve-u-17468ffde13\">\n<p><span class=\"thrv-advanced-inline-text tve_editable tcb-styled-list-icon-text tcb-no-delete tcb-no-save dynamic-group-kbulwoj9\" data-css=\"tve-u-17468ffde15\"><\/p>\n<p>Bagging helps in reducing the overfitting. As we are averaging all the models outputs using the majority voting approach.<\/p>\n<p><\/span>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tcb-flex-col\">\n<div class=\"tcb-col dynamic-group-kbulxl9a\" data-css=\"tve-u-17468ffde16\">\n<div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box tve-elem-default-pad dynamic-group-kbulxc3q\" data-css=\"tve-u-17468ffde17\">\n<div class=\"tve-cb\">\n<h4 class=\"\" id=\"t-1599488265669\">Cons<\/h4>\n<div class=\"thrv_wrapper thrv-styled_list dynamic-group-kbulx7a0\" data-icon-code=\"icon-times-solid\" data-css=\"tve-u-17468ffde1a\">\n<ul class=\"tcb-styled-list\">\n<li class=\"thrv-styled-list-item dynamic-group-kbulwyg8\" data-css=\"tve-u-17468ffde1b\">\n<p><span class=\"thrv-advanced-inline-text tve_editable tcb-styled-list-icon-text tcb-no-delete tcb-no-save dynamic-group-kbulwoj9\" data-css=\"tve-u-17468ffde1d\"><\/p>\n<p>For regression models the predicted value won\u2019t be optimised. if any one of the models is deviating more as the output value will be average of all the models.<\/p>\n<p><\/span>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<h3 id=\"t-1599488265671\" class=\"\">Bagging Algorithms<\/h3>\n<p dir=\"ltr\">Below are the list algorithms that fall under bagging.<\/p>\n<h2 id=\"t-1599488265672\" class=\"\">What is Boosting?<\/h2>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-17469068653\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/7-Boosting-ensemble-method-1.png?resize=613%2C581&amp;ssl=1\" class=\"tve_image wp-image-5431\" alt=\"Boosting ensemble method\" data-id=\"5431\" width=\"613\" data-init-width=\"1566\" height=\"581\" data-init-height=\"1484\" title=\"Boosting ensemble method\" loading=\"lazy\" data-width=\"613\" data-height=\"581\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5431\" alt=\"Boosting ensemble method\" data-id=\"5431\" width=\"613\" data-init-width=\"1566\" height=\"581\" data-init-height=\"1484\" title=\"Boosting ensemble method\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/7-Boosting-ensemble-method-1.png?resize=613%2C581&amp;ssl=1\" data-width=\"613\" data-height=\"581\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Boosting Ensemble Method<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">In the boosting method, all the individual models are built <strong>sequentially<\/strong>. Which means the outcome of the first model passes to the next model and etc. \u00a0<\/p>\n<p dir=\"ltr\">In bagging the models are built parallel so we don\u2019t know what the error of each model is. Whereas in boosting once the first model built we know the <strong>error<\/strong> of that model. So when we pass this first model to the next model the intention is to <strong>reduce<\/strong> the error further. In some boosting algorithm, each model has to reduce a minimum of <strong>50%<\/strong> of error.<\/p>\n<p dir=\"ltr\">Unlike bagging all the observations in the bootstrapping sample are not <strong>equally<\/strong> treated in boosting. Observations will have some weightage. For a few observations, the weightage will be high for others lower.<\/p>\n<p dir=\"ltr\">Suppose we are building a binary classification model. The first model is <strong>not<\/strong> accurately predicting the \u00a0class 01 target, then the input to the second model will get in sequentially way, saying focus more on predicting target class 01.\u00a0<\/p>\n<p dir=\"ltr\">When selecting the data samples from the bootstrap sample few observations will have high weightage, in this case the data point which can help in accurately predicting the target class 01 will have higher weightage than the other data points.<\/p>\n<p dir=\"ltr\">For the final target, the predictions from all the models will be <strong>weighted<\/strong>. Hence the final prediction will be the <strong>weighted average<\/strong>.<\/p>\n<h4 class=\"\">In Short:<\/h4>\n<p dir=\"ltr\">In boosting all the individual models will build one after the other. Each model output will pass as input to the next model along with next model bootstrap sample data.\u00a0<\/p>\n<h3 id=\"t-1599488265673\" class=\"\">Boosting ensemble method Pros &amp; Cons<\/h3>\n<\/div>\n<div class=\"thrv_wrapper thrv-page-section thrv-lp-block\" data-inherit-lp-settings=\"1\" data-css=\"tve-u-1746907706f\" data-keep-css_id=\"1\">\n<div class=\"tve-page-section-in tve_empty_dropzone  \" data-css=\"tve-u-174690772e1\">\n<div class=\"thrv_wrapper thrv-columns dynamic-group-kbulxqe6\" data-css=\"tve-u-17469077070\">\n<div class=\"tcb-flex-row v-2 tcb--cols--2\" data-css=\"tve-u-17469077071\">\n<div class=\"tcb-flex-col\">\n<div class=\"tcb-col dynamic-group-kbulxl9a\" data-css=\"tve-u-17469077072\">\n<div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box tve-elem-default-pad dynamic-group-kbulxc3q\" data-css=\"tve-u-17469077073\">\n<div class=\"tve-cb\">\n<h4 class=\"\" id=\"t-1599488265674\">Pros<\/h4>\n<div class=\"thrv_wrapper thrv-styled_list dynamic-group-kbulx7a0\" data-icon-code=\"icon-check\" data-css=\"tve-u-17469077077\">\n<ul class=\"tcb-styled-list\">\n<li class=\"thrv-styled-list-item dynamic-group-kbulwyg8\" data-css=\"tve-u-17469077078\">\n<p><span class=\"thrv-advanced-inline-text tve_editable tcb-styled-list-icon-text tcb-no-delete tcb-no-save dynamic-group-kbulwoj9\" data-css=\"tve-u-1746907707a\"><\/p>\n<p>Boosting reduces the bias, As each model tries to reduce the errors of the previous model in the sequential chain.<\/p>\n<p><\/span>\n<\/li>\n<li class=\"thrv-styled-list-item dynamic-group-kbulwyg8\" data-css=\"tve-u-17469077078\">\n<p><span class=\"thrv-advanced-inline-text tve_editable tcb-styled-list-icon-text tcb-no-delete tcb-no-save dynamic-group-kbulwoj9\" data-css=\"tve-u-1746907707a\"><\/p>\n<p>We can use multiple loss functions to reduce the error in each sequential models.<\/p>\n<p><\/span>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tcb-flex-col\">\n<div class=\"tcb-col dynamic-group-kbulxl9a\" data-css=\"tve-u-1746907707b\">\n<div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box tve-elem-default-pad dynamic-group-kbulxc3q\" data-css=\"tve-u-1746907707c\">\n<div class=\"tve-cb\">\n<h4 class=\"\" id=\"t-1599488265675\">Cons<\/h4>\n<div class=\"thrv_wrapper thrv-styled_list dynamic-group-kbulx7a0\" data-icon-code=\"icon-times-solid\" data-css=\"tve-u-1746907707f\">\n<ul class=\"tcb-styled-list\">\n<li class=\"thrv-styled-list-item dynamic-group-kbulwyg8\" data-css=\"tve-u-17469077080\">\n<p><span class=\"thrv-advanced-inline-text tve_editable tcb-styled-list-icon-text tcb-no-delete tcb-no-save dynamic-group-kbulwoj9\" data-css=\"tve-u-17469077082\"><\/p>\n<p>Boosting method tends to over-fitting, As the models build sequentially, all the models try to reduce the train error.<\/p>\n<p><\/span>\n<\/li>\n<li class=\"thrv-styled-list-item dynamic-group-kbulwyg8\" data-css=\"tve-u-17469077083\">\n<p><span class=\"thrv-advanced-inline-text tve_editable tcb-styled-list-icon-text tcb-no-delete tcb-no-save dynamic-group-kbulwoj9\" data-css=\"tve-u-17469077085\"><\/p>\n<p>We need special care in turning the hyper-parameters.<\/p>\n<p><\/span>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<h3 id=\"t-1599488265676\" class=\"\">Boosting Algorithms<\/h3>\n<p dir=\"ltr\">Below is the list of algorithms that fall under boosting.<\/p>\n<ul class=\"\">\n<li>Adaboost algorithm<\/li>\n<li>Xgbm algorithm<\/li>\n<li>LightGBM<\/li>\n<li>CatBoost<\/li>\n<li>LPBoost<\/li>\n<li>GradientBoost<\/li>\n<li>BrownBoost<\/li>\n<\/ul>\n<h2 id=\"t-1599488265677\" class=\"\">Bagging Vs Boosting Comparison<\/h2>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-17469437135\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i1.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/8-Difference-Between-Bagging-and-Boosting.png?resize=690%2C384&amp;ssl=1\" class=\"tve_image wp-image-5473\" alt=\"Difference Between Bagging and Boosting\" data-id=\"5473\" width=\"690\" data-init-width=\"2094\" height=\"384\" data-init-height=\"1164\" title=\"Difference Between Bagging and Boosting\" loading=\"lazy\" data-width=\"773\" data-height=\"430\" data-css=\"tve-u-17469438158\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5473\" alt=\"Difference Between Bagging and Boosting\" data-id=\"5473\" width=\"690\" data-init-width=\"2094\" height=\"384\" data-init-height=\"1164\" title=\"Difference Between Bagging and Boosting\" loading=\"lazy\" src=\"https:\/\/i1.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/09\/8-Difference-Between-Bagging-and-Boosting.png?resize=690%2C384&amp;ssl=1\" data-width=\"773\" data-height=\"430\" data-css=\"tve-u-17469438158\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Difference Between Bagging and Boosting<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">We learned the bagging and boosting separately. Now let\u2019s compare these two ensemble methods to take our understanding to the next level.<\/p>\n<h3 id=\"t-1599488265678\" class=\"\">Splitting the datasets<\/h3>\n<p dir=\"ltr\">For splitting the actual train data to multiple datasets, as known as the bootstrap samples both these methods use the bootstrapping statistical method.<\/p>\n<p dir=\"ltr\">In bagging once the bootstrap samples create, there will be <strong>no changes<\/strong> for building multiple models. where as in the boosting based on the previous model output the individual observation will have weightage. Some data points the bootstrap will have low weightage, whereas some data points will have higher weightage.<\/p>\n<h3 id=\"t-1599488265679\" class=\"\">Training individual models (weak learners)<\/h3>\n<p dir=\"ltr\">In the training phase both these methods will change in the way they build models. In the bagging method all the individual models will take the bootstrap samples and create the models in parallel. Whereas in the \u00a0boosting each model will build sequentially. The output of the first model (the erros information) will be pass along with the bootstrap samples data.<\/p>\n<h3 id=\"t-1599488265680\" class=\"\">Performing predictions<\/h3>\n<p dir=\"ltr\">For performing in the bagging method, all the individual models will predict the target outcome, using the <strong>majority voting<\/strong> approach we will select the final prediction. Whereas in the boosting method all the model predictions will have some weightage, the final prediction will be the <strong>weighted average<\/strong>. In the bagging method it is just the normal average.\u00a0<\/p>\n<h3 id=\"t-1599488265681\" class=\"\">Which one is better ? Boosting Or Bagging ?<\/h3>\n<p dir=\"ltr\">Now the final question\u00a0<\/p>\n<blockquote class=\"\"><p><strong>Which one to choose for modeling then ?<\/strong><\/p><\/blockquote>\n<p dir=\"ltr\">Yes this is the correct way of thinking, where both these ensemble methods are powerful which one we need to choose?<\/p>\n<p dir=\"ltr\">This depends on the problem. Sometimes for selecting the final method we need to have a look at each method&#8217;s advantages and disadvantages.\u00a0<\/p>\n<p dir=\"ltr\">Let\u2019s say if the individual models are getting low model performance then in the bagging the combination of all the low performance models will lead to the low performing model.\u00a0<\/p>\n<p dir=\"ltr\">Whereas if the individual models are ovefitting then the final model with the boosting method will lead to an overfitting model, in such case we can use the bagging method.<\/p>\n<p dir=\"ltr\">So the final conclusion is we don\u2019t have any hard rule for which method to use but in most cases bagging methods will outperform well than the boosting methods. The main problem with boosting methods is that they tend to overfit the data.<\/p>\n<h2 id=\"t-1599488265682\" class=\"\">Conclusion<\/h2>\n<p dir=\"ltr\">We learned how bagging and boosting methods are different by understanding ensemble learning. In this process, we learn about bootstrapping, weak learner\u2019s concepts. In the end we learnt how these methods vary in each level of modeling.<\/p>\n<h4 class=\"\">Recommended Machine Learning Courses<\/h4>\n<\/div>\n<div class=\"thrv_wrapper thrv-page-section thrv-lp-block\" data-inherit-lp-settings=\"1\" data-css=\"tve-u-174690c4bf5\" data-keep-css_id=\"1\">\n<div class=\"tve-page-section-in tve_empty_dropzone  \" data-css=\"tve-u-174690c4eda\">\n<div class=\"thrv_wrapper thrv-columns dynamic-group-kbt3q0q7\" data-css=\"tve-u-174690c4bf7\">\n<div class=\"tcb-flex-row v-2 tcb--cols--3 tcb-medium-no-wrap tcb-mobile-wrap m-edit\" data-css=\"tve-u-174690c4bf8\">\n<div class=\"tcb-flex-col\" data-css=\"tve-u-174690de094\">\n<div class=\"tcb-col dynamic-group-kbt3pyfd\" data-css=\"tve-u-174690c4bf9\">\n<div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box tve-elem-default-pad dynamic-group-kbt3pwhk\" data-css=\"tve-u-174690c4bfa\">\n<div class=\"tve-cb\">\n<div class=\"thrv_wrapper tve_image_caption dynamic-group-kbt3pu4z\" data-css=\"tve-u-174690c4c05\"><span class=\"tve_image_frame\"><a href=\"https:\/\/dataaspirant.com\/recommends\/data-science-courses\/machine-learning-z-hands-python-r-data-science-course-udemy\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/machine-learning-1.jpg?resize=185%2C185&amp;ssl=1\" class=\"tve_image wp-image-4302\" alt=\"Machine learning\" data-id=\"4302\" width=\"185\" data-init-width=\"150\" height=\"185\" data-init-height=\"150\" title=\"machine learning\" loading=\"lazy\" data-width=\"185\" data-height=\"185\" data-css=\"tve-u-174690c4c06\" data-link-wrap=\"true\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-4302\" alt=\"Machine learning\" data-id=\"4302\" width=\"185\" data-init-width=\"150\" height=\"185\" data-init-height=\"150\" title=\"machine learning\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/machine-learning-1.jpg?resize=185%2C185&amp;ssl=1\" data-width=\"185\" data-height=\"185\" data-css=\"tve-u-174690c4c06\" data-link-wrap=\"true\" data-recalc-dims=\"1\"><\/a><span class=\"tve-image-overlay\"><\/span><\/span><\/div>\n<h4 class=\"\" data-css=\"tve-u-174690c4c08\">Machine Learning With Python<\/h4>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tcb-flex-col\" data-css=\"tve-u-174690ddf68\">\n<div class=\"tcb-col dynamic-group-kbt3pyfd\" data-css=\"tve-u-174690c4bf9\">\n<div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box tve-elem-default-pad dynamic-group-kbt3pwhk\" data-css=\"tve-u-174690c4c14\">\n<div class=\"tve-cb\">\n<div class=\"thrv_wrapper tve_image_caption dynamic-group-kbt3pu4z\" data-css=\"tve-u-174690c4c15\"><span class=\"tve_image_frame\"><a href=\"https:\/\/dataaspirant.com\/recommends\/data-science-courses\/data-science-specialization-coursera\/\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/datascience-spelization.jpg?resize=185%2C185&amp;ssl=1\" class=\"tve_image wp-image-4307\" alt=\"Data Science Full Specialization\" data-id=\"4307\" width=\"185\" data-init-width=\"175\" height=\"185\" data-init-height=\"175\" title=\"datascience spelization\" loading=\"lazy\" data-width=\"185\" data-height=\"185\" data-css=\"tve-u-174690c4c16\" data-link-wrap=\"true\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-4307\" alt=\"Data Science Full Specialization\" data-id=\"4307\" width=\"185\" data-init-width=\"175\" height=\"185\" data-init-height=\"175\" title=\"datascience spelization\" loading=\"lazy\" src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/datascience-spelization.jpg?resize=185%2C185&amp;ssl=1\" data-width=\"185\" data-height=\"185\" data-css=\"tve-u-174690c4c16\" data-link-wrap=\"true\" data-recalc-dims=\"1\"><\/a><span class=\"tve-image-overlay\"><\/span><\/span><\/div>\n<h4 class=\"\" data-css=\"tve-u-174690c4c18\">Python Data Science Specialization<\/h4>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tcb-flex-col\" data-css=\"tve-u-174690de0e4\">\n<div class=\"tcb-col dynamic-group-kbt3pyfd\" data-css=\"tve-u-174690c4bf9\">\n<div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box tve-elem-default-pad dynamic-group-kbt3pwhk\" data-css=\"tve-u-174690c4c23\">\n<div class=\"tve-cb\">\n<div class=\"thrv_wrapper tve_image_caption dynamic-group-kbt3pu4z\" data-css=\"tve-u-174690c4c24\"><span class=\"tve_image_frame\"><a href=\"https:\/\/dataaspirant.com\/recommends\/data-science-courses\/superviesed-learning-scikit-learn-datacamp\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/supervised-learning.png?resize=185%2C185&amp;ssl=1\" class=\"tve_image wp-image-4696\" alt=\"supervised learning\" data-id=\"4696\" width=\"185\" data-init-width=\"464\" height=\"185\" data-init-height=\"482\" title=\"supervised learning\" loading=\"lazy\" data-width=\"185\" data-height=\"185\" data-css=\"tve-u-174690c4c25\" data-link-wrap=\"true\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-4696\" alt=\"supervised learning\" data-id=\"4696\" width=\"185\" data-init-width=\"464\" height=\"185\" data-init-height=\"482\" title=\"supervised learning\" loading=\"lazy\" src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/supervised-learning.png?resize=185%2C185&amp;ssl=1\" data-width=\"185\" data-height=\"185\" data-css=\"tve-u-174690c4c25\" data-link-wrap=\"true\" data-recalc-dims=\"1\"><\/a><span class=\"tve-image-overlay\"><\/span><\/span><\/div>\n<h4 class=\"\" data-css=\"tve-u-174690c4c27\">Supervised learning with Scikit Learn<\/h4>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/dataaspirant.com\/ensemble-methods-bagging-vs-boosting-difference\/<\/p>\n","protected":false},"author":0,"featured_media":1120,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/posts\/1119"}],"collection":[{"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/comments?post=1119"}],"version-history":[{"count":0,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/posts\/1119\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/media\/1120"}],"wp:attachment":[{"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/media?parent=1119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/categories?post=1119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/tags?post=1119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}