Professional Documents
Culture Documents
Ensemble Machine Learning Approach
Ensemble Machine Learning Approach
On the basis of the arrangement of base learners, ensemble methods can be divided into two
groups: In parallel ensemble methods, base learners are generated in parallel for example.
Random Forest. In sequential ensemble methods, base learners are generated sequentially for
example AdaBoost.
On the basis of the type of base learners, ensemble methods can be divided into two
groups: homogenous ensemble method uses the same type of base learner in each
iteration. heterogeneous ensemble method uses the different type of base learner in each
iteration.
AdaBoost Classifier
Ada-boost or Adaptive Boosting is one of ensemble boosting classifier proposed by Yoav Freund
and Robert Schapire in 1996. It combines multiple classifiers to increase the accuracy of
classifiers. AdaBoost is an iterative ensemble method. AdaBoost classifier builds a strong
classifier by combining multiple poorly performing classifiers so that you will get high accuracy
strong classifier. The basic concept behind Adaboost is to set the weights of classifiers and
training the data sample in each iteration such that it ensures the accurate predictions of unusual
observations. Any machine learning algorithm can be used as base classifier if it accepts weights
on the training set. Adaboost should meet two conditions:
Before we dive into the code, it’s important that we grasp how the
Gradient Boost algorithm is implemented under the hood. Suppose, we
were trying to predict the price of a house given their age, square
footage and location.
Step 1: Calculate the average of the target label
In our example, the predicted value is the equal to the mean calculated
in the previous step and the actual value can be found in the price
column of each sample. After computing the residuals, we get the
following table.
Step 3: Construct a decision tree
Next, we build a tree with the goal of predicting the residuals. In other
words, every leaf will contain a prediction as to the value of the residual
(not the desired label).
In the event there are more residuals than leaves, some residuals will
end up inside the same leaf. When this happens, we compute their
average and place that inside the leaf.
Each sample passes through the decision nodes of the newly formed
tree until it reaches a given lead. The residual in said leaf is used to
predict the house price.
The final prediction will be equal to the mean we computed in the first
step, plus all of the residuals predicted by the trees that make up the
forest multiplied by the learning rate.
Code