CS307
Machine Learning
Lecture 15
Ensemble Learning
Krishnendu Ghosh
Department of Computer Science & Engineering
Indian Institute of Information Technology Dharwad
Ensemble Learning
Ensemble learning combines the predictions of multiple models (called "weak learners" or "base models") to make a stronger, more reliable prediction. The goal is to reduce errors and improve performance.
It is like asking a group of experts for their opinions instead of relying on just one person. Each expert might make mistakes, but when you combine their knowledge, the final decision is often better and more accurate.
2
Ensemble Learning
There are many types of ensemble methods:
3
Ensemble Learning: Voting
Voting
4
Ensemble Learning: Voting
Majority Voting / Hard Voting
Hard voting is the simplest case of majority voting. Here, we predict the class label y^
via majority (plurality) voting of each classifier Cj:
y^=mode{C1(x),C2(x),...,Cm(x)}
Assuming that we combine three classifiers that classify a training sample as follows:
classifier 1 -> class 0
classifier 2 -> class 0
classifier 3 -> class 1
y^=mode{0,0,1}=0
Via majority vote, we would classify the sample as "class 0."
5
Ensemble Learning: Voting
Weighted Majority Vote
In addition to the simple majority vote (hard voting) as described in the previous section, we can compute a weighted majority vote by associating a weight wj with classifier Cj:
y^=argmaxi∑j=1mwjχA(Cj(x)=i),
where χA is the characteristic function [Cj(x)=i∈A], and A is the set of unique class labels.
Continuing with the example from the previous section
classifier 1 -> class 0
classifier 2 -> class 0
classifier 3 -> class 1
assigning the weights {0.2, 0.2, 0.6} would yield a prediction y^=1:
argmaxi[0.2×i0+0.2×i0+0.6×i1]=1
6
Ensemble Learning: Voting
Soft Voting
In soft voting, we predict the class labels based on the predicted probabilities p for classifier -- this approach is only recommended if the classifiers are well-calibrated.
y^=argmaxi∑j=1mwjpij,
where wj is the weight that can be assigned to the jth classifier.
Assuming the example in the previous section was a binary classification task with class labels i∈{0,1}, our ensemble could make the following prediction:
C1(x)→[0.9,0.1]
C2(x)→[0.8,0.2]
C3(x)→[0.4,0.6]
7
Ensemble Learning: Bagging
Bagging (Bootstrap Aggregating) is an ensemble learning technique designed to improve the accuracy and stability of machine learning algorithms. It involves the following steps:
8
Ensemble Learning: Bagging
9
Ensemble Learning: Bagging
Key Benefits:
Overview of Bagging classifier algorithm:
10
Ensemble Learning: Bagging
Example of Bagging Algorithms:
11
Ensemble Learning: Random Forest
A Random Forest is a collection of decision trees that work together to make predictions. In this article, we'll explain how the Random Forest algorithm works and how to use it.
12
Ensemble Learning: Boosting
Boosting is an ensemble technique that combines multiple weak learners to create a strong learner. Weak models are trained in series such that each next model tries to correct errors of the previous model until the entire training dataset is predicted correctly.
13
Ensemble Learning: Boosting
Overview of Boosting algorithm:
14
Ensemble Learning: Boosting
Key Benefits:
Example of Boosting Algorithms:
15
Ensemble Learning: Stacked Generalization
Stacking (Stacked Generalization) is an ensemble learning technique that aims to combine multiple models to improve predictive performance. It involves the following steps:
16
Ensemble Learning: Stacked Generalization
Key Benefits:
17
Random Forest
Random forests or random decision forests is an ensemble learning method for classification, regression and other tasks that works by creating a multitude of decision trees during training.
18
Random Forest
19
Random Forest
20
Random Forest
21
Random Forest
22
Random Forest
23
Random Forest
24
Random Forest
25
Random Forest
26
Random Forest
27
Random Forest
28
Random Forest
29
Random Forest
30
Random Forest
31
Random Forest
32
Adaboost
33
Random Forest
34
Random Forest
35
Random Forest
36
Random Forest
37
Random Forest
38
Random Forest
39
Random Forest
40
Random Forest
41
Random Forest
42
Adaboost
43
RF
44
RF
45
RF
46
RF
47
RF
48
RF
49
RF
50
RF
51
RF
52
RF
53
RF
54
RF
55
RF
56
RF
57
RF
58
RF
59
RF
60
RF
61
RF
62
RF
63
RF
64
RF
65
RF
66
RF
67
RF
68
RF
69
Adaboost
AdaBoost (short for Adaptive Boosting) is a statistical classification meta-algorithm formulated by Yoav Freund and Robert Schapire in 1995, who won the 2003 Gödel Prize for their work.
70
Adaboost
71
Adaboost
72
Adaboost
73
Adaboost
74
Adaboost
75
Adaboost
76
Adaboost
77
Adaboost
78
Adaboost
79
Adaboost
80
Adaboost
81
Adaboost
82
Adaboost
83
Adaboost
84
Adaboost
85
Adaboost
86
Adaboost
87
Adaboost
88
Adaboost
89
Adaboost
90
Adaboost
91
Adaboost
92
Adaboost
93
Adaboost
94
Adaboost
95
Adaboost
96
Adaboost
97
Adaboost
98
Adaboost
99
Adaboost
100
Adaboost
101
Adaboost
102
Adaboost
103
Adaboost
104
Adaboost
105
Adaboost
106
Adaboost
107
Adaboost
108
Adaboost
109
Adaboost
110
Adaboost
111
Adaboost
112
Adaboost
113
Adaboost
114
Adaboost
115
Adaboost
116
Adaboost
117
Adaboost
118
Adaboost
119
Adaboost
120
Adaboost
121
Adaboost
122
Adaboost
123
Adaboost
124
Adaboost
125
Adaboost
126
Adaboost
127
Adaboost
128
Adaboost
129
Adaboost
130
Adaboost
131
Adaboost
132
Adaboost
133
Adaboost
134
Adaboost
135
Adaboost
136
Adaboost
137
Thank You
138