logo
logo
Sign in

What is an AdaBoost Algorithm in Data Science?

avatar
Nishit Agarwal
What is an AdaBoost Algorithm in Data Science?

One of the most often used Machine Learning techniques is the AdaBoost algorithm, which is short for Adaptive Boosting. Due to the way weights are allocated, it is termed Adaptive Boosting. The heavier the weights are applied to instances that were mistakenly categorised, the more accurate the result is going to be. For supervised learning, boosting is used to decrease bias and variation. It is based on the idea that students’ progress at their own pace. Only the first learner is a seed from which all others are produced. In other words, weak students become strong ones. The machine learning course online can help you to get a better understanding on this subject.


How Does AdaBoost Work?

Let's start by explaining how boosting works. It produces n decision trees during data training. When creating a decision tree or model, the incorrectly classified record takes priority. The second model only accepts these records. The procedure is not complete until we know how many basic learners we want to produce. Remember that all boosting methods allow for record repetition. The AdaBoost algorithm is simple to learn if we know the boosting concept. Examine AdaBoost in more detail. The random forest technique creates an arbitrary number of trees, n. It makes trees with root and leaf nodes. A random forest has no consistent depth. The AdaBoost algorithm creates a Stump node with just two leaves.


Stump:

The thorny tree stump only one node with two leaves can be readily observed. Boosting strategies favour weak learners like these stumps. AdaBoost's stump order is critical. The initial stump's mistake has an impact on subsequent stumps.


Step 1 – Creating the First Base Learner:

The algorithm starts by creating the first stump, f1. This is the same as characteristics. Just three attributes yield three stumps. Three decision trees from these stumps. Assume you're a stumps-based learner with that is what the algorithm does. Picking a base learner considers Gini and Entropy. Like decision trees, we must compute Gini and Entropy. The first base learner is a stump. Each of the three stumps has three variations or dimensions. On the right is the number of records properly categorised. Entropy is calculated using these records. Entropy or Gini will choose each stump's base learner. Make 1 the least entropy. Begin with stump 1, or feature 1. The best machine learning course online can help you to gain deeper knowledge on this subject.


Step 2 – Calculating the Total Error (TE):

The total error is the sum of all mistakes in the categorized record for sample weights. Total Mistake (TE) is 1/5 since there is just one error.

 

Step 3 – Calculating Performance of the Stump:

The TE is 1/5. Adding total error to the above computation yields a performance value of 0.693 for the stump. Why must a stump's TE and performance be calculated? No sample weight update before going on to the next model or stage means the prior model's output. The erroneously classified data should be prioritized in the boosting process. So only the wrong records are forwarded to another stump from the decision tree/stump. AdaBoost, on the other hand, lets both records through, causing additional errors. We need to boost the weight for wrong records and drop it for correct records. The weights will be updated based on the stump's performance.

 

Step 4 – Updating Weights:

The following is the weights calculation for records that have been erroneously classified:

Sample Weight x e = New Sample Weight / Sample Weight

(Performance)

1/5 * e (0.693) Equals 0.399 for our sample weight.

If a record has been accurately categorised, the performance value is set to a negative number. This results in the weight of properly categorized data being lower than mistakenly classed ones.

 

Step 5 – Creating a New Dataset:

It's now time to re-create our old dataset from scratch. The number of records that have been wrongly categorised will outnumber the number of right ones in the new dataset. Normalized weights must be used to build the new dataset. For the sake of training, it is likely that the incorrect records will be selected. That's the second-choice tree/stump that you'll face. The method will split the dataset into buckets in order to create a new dataset based on normalized weight. A machine learning course can help you to enhance your skills. 

collect
0
avatar
Nishit Agarwal
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more