Adaptive Boosting (In-depth intuition)
This post assumes you are already familiar with the decision trees, and bootstrapping.
Adaboost is a boosting technique. In simple words, boosting is a sequential (next to next) model. It is a powerful model for classification problems because sequentially tree growing considering past mistakes. It adapts the weights to its own and changes the weights based on past mistakes.
Adaboost likes weak learners. It combines multiple weak learners and change weak learners to super learners. ❤️🔥
This AdaBoost will build based on the decision trees. So, decision trees' knowledge is highly acceptable.
Terminology!!
Stump - A tree with one node and two leaves!
In contrast, in a forest of trees made with adaboost, the trees are usually a node and two leaves (stumps).
Order of Stump is important?
In contrast, in the Forest of Stumps made with AdaBoost, the order is important, but in the random forest it's not important.
Three Main Ideas Behind the Ada boost!
Creating Adaboost!
Consider we need to classify patient is having heart disease or not?
Step1: ( Initialize sample weight )
Formula:
Sample Weight = 1 / Total number of samples!
Step 2: ( Create First Stump )
Calculate say for the first stump!
Formula:
Amount of SAY = 1/2log (1 - Total error) / (Total Error)
Now, we need to learn how to change the weight. So, that the next stump will take the errors that the current stump made.
Step 3: (Increase and decrease the sample weight)
In simple words, we need to increase the sample weight for wrongly classified value and we need to decrease the sample weight for correctly classified value.
Recommended by LinkedIn
The formula for increasing the sample weight
Increase the Sample weight (Formula) = sample weight x e amount of say ( Incorrectly classified values)
The formula for decreasing the sample weight
Decrease the Sample weight (Formula) = sample weight x e - amount of say ( Correctly classified values)
The major difference is that the exponential is having a negative term here, it helps to reduce the correct value.
If you see carefully, the wrongly classified sample values get increased, and correctly classified sample weight gets decreased.
These values are not normalized. It means if you add everything, it must be 1, but the sum of the new weight is not equal to 1. So, we normalized the data.
The formula for normalizing:
= New weight[i] / sum (new weight)
Then we will update the new weights to the old sample weight, for creating a second stump! Then we can use the updated sample weight to make the second stump in the AdaBoost forest (repeated words)
Norm.weight -> Sample weight
Now we can use the modified sample weights to make the second stump in the AdaBoost forest.
In theory, to create the next stump, we will use the weighted Gini Index, but instead of using the weighted Gini Index, we can make a new collection of samples that contains duplicate copies of the samples with the largest sample weights.
Process:
For Example:
1st random number is 0.72. It is in the 5 buckets, right?
2nd random number is 0.42. It is 4 buckets, right?
3rd random number is 0.83 it is in 6 buckets, right?
This random initialization was happened automatically by the algorithm!
We just continue this process until the new empty dataset and old dataset have the same shape.
This is our updated dataset. Now, we can use this to make a new stump from the beginning.
Then we do all the process from the beginning! Then this process will go n number of times.
How does Adaboost find the answer?
This is how AdaBoost working ❄️😌
Did you like this article?
+
Name: R.Aravindan
Position: Content Writer
Company: Artificial Neurons.AI