SlideShare a Scribd company logo
Bagging and Boosting
Amit Srinet
Dave Snyder
Outline
Bagging
Definition
Variants
Examples
Boosting
Definition
Hedge(β)
AdaBoost
Examples
Comparison
Bagging
Bootstrap Model
Randomly generate L set of cardinality N from the original
set Z with replacement.
Corrects the optimistic bias of R-Method
"Bootstrap Aggregation"
Create Bootstrap samples of a training set using sampling
with replacement.
Each bootstrap sample is used to train a different
component of base classifier
Classification is done by plurality voting
Bagging
Regression is done by averaging
Works for unstable classifiers
Neural Networks
Decision Trees
Bagging
Kuncheva
Example
PR Tools:
>> A = gendatb(500,1);
>> scatterd(A)
>> W1 = baggingc(A,treec,100,[],[]);
>> plotc(W1(:,1:2),'r')
>> W2 = baggingc(A,treec,100,treec,[]);
>> plotc(W2)
Generates 100 trees with default settings - stop
based on purity metric, zero pruning
Example
Bagging: Decision
Tree
Decision boundary produced
by one tree
Training data
Example
Bagging: Decision Tree
Decision boundary produced by a
third tree
Decision boundary produced by a
second tree
Example
Three trees and final boundary Final result from bagging all trees.
overlaid
Bagging: Decision
Tree
Bagging: Neural Net
Example
Three neural nets generated with
default settings [bpxnc]
Final output from bagging 10
neural nets
Why does bagging work ?
Main reason for error in learning is due to noise ,bias and
variance.
Noise is error by the target function
Bias is where the algorithm can not learn the target.
Variance comes from the sampling, and how it affects the
learning algorithm
Does bagging minimizes these errors ?
Yes
Averaging over bootstrap samples can reduce error from
variance especially in case of unstable classifiers
Bagging
In fact Ensemble reduces variance
Let f(x) be the target value of x and h1 to hn
be the set of base hypotheses and h-
average be the prediction of base
hypotheses
E(h,x) = (f(x) – h(x))^2 Squared Error
Ensemble Reduces variance
Let f(x) be the target value for x.
Let h1, . . . , hn be the base hypotheses.
Let h-avg be the average prediction of h1, .
. . , hn.
Let E(h, x) = (f(x) −h(x))2
Is there any relation between h-avg and
variance?
yes
E(h-avg,x) = ∑(i = 1 to n)E(hi ,x)/n
∑(i = 1 to n) (hi(x) – h-avg(x))^2/n
That is squared error of the average prediction
equals the average squared error of the base
hypotheses minus the variance of the base
hypotheses.
Reference – 1-End of the slideshow.
Bagging - Variants
Random Forests
A variant of bagging proposed by Breiman
It’s a general class of ensemble building methods using
a decision tree as base classifier.
Classifier consisting of a collection of tree-structure
classifiers.
Each tree grown with a random vector Vk where k = 1,…L
are independent and statistically distributed.
Each tree cast a unit vote for the most popular class at input
x.
Boosting
□Atechnique for combining multiple base classifiers whose
combined performance is significantly better than that of any
of the base classifiers.
Sequential training of weak learners
Each base classifier is trained on data that is weighted
based on the performance of the previous classifier
Each classifier votes to obtain a final outcome
Boosting
Duda, Hart,
and Stork
Boosting - Hedge(β)
Boosting follows the model of online algorithm.
Algorithm allocates weights to a set of strategies and
used to predict the outcome of the certain event
After each prediction the weights are redistributed.
Correct strategies receive more weights while the weights
of the incorrect strategies are reduced further.
Relation with Boosting algorithm.
Strategies corresponds to classifiers in the ensemble and
the event will correspond to assigning a label to sample
drawn randomly from the input.
Boosting
Kuncheva
Boosting - AdaBoost
Start with equally weighted data, apply first classifier
Increase weights on misclassified data, apply second
classifier
Continue emphasizing misclassified data to subsequent
classifiers until all classifiers have been trained
Boosting
Kuncheva
Boosting - AdaBoost
Training error: Kuncheva 7.2.4
In practice overfitting rarely occurs (Bishop)
Bishop
Margin Theory
Testing error continues to decrease
Ada-boost brought forward margin theory
Margin for an object is related to certainty of
its classification.
Positive and large margin – correct
classification
Negative margin - Incorrect Classification
Very small margin – Uncertainty in
classification
Similar classifier can give different label to
an input.
Margin of object x is calculated using the
degree of support.
Where
Freund and schapire proved upper bounds
on the testing error that depend on the
margin
Let H a finite space of base classifiers.For
delta > 0 and theta > 0 with probability at
least 1 –delta over the random choice of the
training set Z, any classifier ensemble D
{D1, . . . ,DL} ≤ H combined by the weighted
average satisfies
P(error ) = probability that the ensemble will
make an error in labeling x drawn randomly
from the distribution of the problem
P(training margin < theta ) is the probabilty that
the margin for a randomly drawn data point
from a randomly drawn training set does not
exceed theta
Thus the main idea for boosting is to
approximate the target by approximating
the weight of the function.
These weights can be seen as the min-max
strategy of the game.
Thus we can apply the notion of game
theory for ada-boost.
This idea has been discussed in the paper
of freund and schpaire.
Experiment
PR Tools:
>> A = gendatb(500, 1);
>> [W,V,ALF] = adaboostc(A,qdc,20,[],1);
>> scatterd(A)
>> plotc(W)
□
Uses Quadratic Bayes Normal Classifier with default
settings, 20 iterations.
Example
AdaBoost: QDC
Each QDC classification boundary
(black), Final output (red)
Final output of AdaBoost with 20
QDC classifiers
Experiments
AdaBoost: Decision Tree
Final output of AdaBoost with 20
decision trees
AdaBoost using 20 decision trees
with default settings
Experiments
AdaBoost: Neural Net
AdaBoost using 20 neural nets
[bpxnc] default settings
Final output of AdaBoost with 20
neural nets
Bagging & Boosting
Comparing bagging and boosting:
Kuncheva
References
1 - A. Krogh and J. Vedelsby (1995).Neural
network ensembles, cross validation and
activelearning. In D. S. Touretzky G.
Tesauro and T. K. Leen, eds., Advances in
Neural Information Processing Systems, pp.
231-238, MIT Press.

More Related Content

Similar to Bagging_and_Boosting.pptx

2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…
2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…
2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…Dongseo University
 
Naive Bayes Presentation
Naive Bayes PresentationNaive Bayes Presentation
Naive Bayes Presentation
Md. Enamul Haque Chowdhury
 
Data.Mining.C.6(II).classification and prediction
Data.Mining.C.6(II).classification and predictionData.Mining.C.6(II).classification and prediction
Data.Mining.C.6(II).classification and predictionMargaret Wang
 
L1 intro2 supervised_learning
L1 intro2 supervised_learningL1 intro2 supervised_learning
L1 intro2 supervised_learning
Yogendra Singh
 
Unit-2 Bayes Decision Theory.pptx
Unit-2 Bayes Decision Theory.pptxUnit-2 Bayes Decision Theory.pptx
Unit-2 Bayes Decision Theory.pptx
avinashBajpayee1
 
bayesNaive.ppt
bayesNaive.pptbayesNaive.ppt
bayesNaive.ppt
KhushiDuttVatsa
 
bayesNaive.ppt
bayesNaive.pptbayesNaive.ppt
bayesNaive.ppt
OmDalvi4
 
bayesNaive algorithm in machine learning
bayesNaive algorithm in machine learningbayesNaive algorithm in machine learning
bayesNaive algorithm in machine learning
Kumari Naveen
 
ABC workshop: 17w5025
ABC workshop: 17w5025ABC workshop: 17w5025
ABC workshop: 17w5025
Christian Robert
 
MLHEP Lectures - day 1, basic track
MLHEP Lectures - day 1, basic trackMLHEP Lectures - day 1, basic track
MLHEP Lectures - day 1, basic track
arogozhnikov
 
Hands-on Tutorial of Machine Learning in Python
Hands-on Tutorial of Machine Learning in PythonHands-on Tutorial of Machine Learning in Python
Hands-on Tutorial of Machine Learning in Python
Chun-Ming Chang
 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learningbutest
 
MLHEP 2015: Introductory Lecture #3
MLHEP 2015: Introductory Lecture #3MLHEP 2015: Introductory Lecture #3
MLHEP 2015: Introductory Lecture #3
arogozhnikov
 
Cheatsheet supervised-learning
Cheatsheet supervised-learningCheatsheet supervised-learning
Cheatsheet supervised-learning
Steve Nouri
 
Model Selection and Validation
Model Selection and ValidationModel Selection and Validation
Model Selection and Validation
gmorishita
 
Understanding Blackbox Prediction via Influence Functions
Understanding Blackbox Prediction via Influence FunctionsUnderstanding Blackbox Prediction via Influence Functions
Understanding Blackbox Prediction via Influence Functions
SEMINARGROOT
 
Introduction to Machine Learning Aristotelis Tsirigos
Introduction to Machine Learning Aristotelis Tsirigos Introduction to Machine Learning Aristotelis Tsirigos
Introduction to Machine Learning Aristotelis Tsirigos butest
 
2.7 other classifiers
2.7 other classifiers2.7 other classifiers
2.7 other classifiers
Krish_ver2
 
Lecture7 cross validation
Lecture7 cross validationLecture7 cross validation
Lecture7 cross validationStéphane Canu
 
Goodfellow, Bengio, Couville (2016) "Deep Learning", Chap. 7
Goodfellow, Bengio, Couville (2016) "Deep Learning", Chap. 7Goodfellow, Bengio, Couville (2016) "Deep Learning", Chap. 7
Goodfellow, Bengio, Couville (2016) "Deep Learning", Chap. 7
Ono Shigeru
 

Similar to Bagging_and_Boosting.pptx (20)

2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…
2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…
2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…
 
Naive Bayes Presentation
Naive Bayes PresentationNaive Bayes Presentation
Naive Bayes Presentation
 
Data.Mining.C.6(II).classification and prediction
Data.Mining.C.6(II).classification and predictionData.Mining.C.6(II).classification and prediction
Data.Mining.C.6(II).classification and prediction
 
L1 intro2 supervised_learning
L1 intro2 supervised_learningL1 intro2 supervised_learning
L1 intro2 supervised_learning
 
Unit-2 Bayes Decision Theory.pptx
Unit-2 Bayes Decision Theory.pptxUnit-2 Bayes Decision Theory.pptx
Unit-2 Bayes Decision Theory.pptx
 
bayesNaive.ppt
bayesNaive.pptbayesNaive.ppt
bayesNaive.ppt
 
bayesNaive.ppt
bayesNaive.pptbayesNaive.ppt
bayesNaive.ppt
 
bayesNaive algorithm in machine learning
bayesNaive algorithm in machine learningbayesNaive algorithm in machine learning
bayesNaive algorithm in machine learning
 
ABC workshop: 17w5025
ABC workshop: 17w5025ABC workshop: 17w5025
ABC workshop: 17w5025
 
MLHEP Lectures - day 1, basic track
MLHEP Lectures - day 1, basic trackMLHEP Lectures - day 1, basic track
MLHEP Lectures - day 1, basic track
 
Hands-on Tutorial of Machine Learning in Python
Hands-on Tutorial of Machine Learning in PythonHands-on Tutorial of Machine Learning in Python
Hands-on Tutorial of Machine Learning in Python
 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learning
 
MLHEP 2015: Introductory Lecture #3
MLHEP 2015: Introductory Lecture #3MLHEP 2015: Introductory Lecture #3
MLHEP 2015: Introductory Lecture #3
 
Cheatsheet supervised-learning
Cheatsheet supervised-learningCheatsheet supervised-learning
Cheatsheet supervised-learning
 
Model Selection and Validation
Model Selection and ValidationModel Selection and Validation
Model Selection and Validation
 
Understanding Blackbox Prediction via Influence Functions
Understanding Blackbox Prediction via Influence FunctionsUnderstanding Blackbox Prediction via Influence Functions
Understanding Blackbox Prediction via Influence Functions
 
Introduction to Machine Learning Aristotelis Tsirigos
Introduction to Machine Learning Aristotelis Tsirigos Introduction to Machine Learning Aristotelis Tsirigos
Introduction to Machine Learning Aristotelis Tsirigos
 
2.7 other classifiers
2.7 other classifiers2.7 other classifiers
2.7 other classifiers
 
Lecture7 cross validation
Lecture7 cross validationLecture7 cross validation
Lecture7 cross validation
 
Goodfellow, Bengio, Couville (2016) "Deep Learning", Chap. 7
Goodfellow, Bengio, Couville (2016) "Deep Learning", Chap. 7Goodfellow, Bengio, Couville (2016) "Deep Learning", Chap. 7
Goodfellow, Bengio, Couville (2016) "Deep Learning", Chap. 7
 

More from ABINASHPADHY6

Untitled (2).pptxghjfgjfgjfghjghghjghghh
Untitled (2).pptxghjfgjfgjfghjghghjghghhUntitled (2).pptxghjfgjfgjfghjghghjghghh
Untitled (2).pptxghjfgjfgjfghjghghjghghh
ABINASHPADHY6
 
Ankit Upadhyadfgdfgdfgy sdgdfgdfghdfgdfgdfg
Ankit Upadhyadfgdfgdfgy sdgdfgdfghdfgdfgdfgAnkit Upadhyadfgdfgdfgy sdgdfgdfghdfgdfgdfg
Ankit Upadhyadfgdfgdfgy sdgdfgdfghdfgdfgdfg
ABINASHPADHY6
 
Rapid Guard PVC Doors (Ritul Joshi).pptx
Rapid Guard PVC Doors (Ritul Joshi).pptxRapid Guard PVC Doors (Ritul Joshi).pptx
Rapid Guard PVC Doors (Ritul Joshi).pptx
ABINASHPADHY6
 
wqedfghj,hgfdgthjkjhgfdsdfgthujsdfrtghyu
wqedfghj,hgfdgthjkjhgfdsdfgthujsdfrtghyuwqedfghj,hgfdgthjkjhgfdsdfgthujsdfrtghyu
wqedfghj,hgfdgthjkjhgfdsdfgthujsdfrtghyu
ABINASHPADHY6
 
Blue Shark Tech zsxdfghsdfghjsdfghjkdfghjkdfghjk
Blue Shark Tech zsxdfghsdfghjsdfghjkdfghjkdfghjkBlue Shark Tech zsxdfghsdfghjsdfghjkdfghjkdfghjk
Blue Shark Tech zsxdfghsdfghjsdfghjkdfghjkdfghjk
ABINASHPADHY6
 
Types-of-Information-System.pptx
Types-of-Information-System.pptxTypes-of-Information-System.pptx
Types-of-Information-System.pptx
ABINASHPADHY6
 
Ferns and Petals.pdf
Ferns and Petals.pdfFerns and Petals.pdf
Ferns and Petals.pdf
ABINASHPADHY6
 
Coursera H5B26VDU9GSH.pdf
Coursera H5B26VDU9GSH.pdfCoursera H5B26VDU9GSH.pdf
Coursera H5B26VDU9GSH.pdf
ABINASHPADHY6
 
Advertising &.pptx
Advertising &.pptxAdvertising &.pptx
Advertising &.pptx
ABINASHPADHY6
 
shubhampresentation-180430060134.pptx
shubhampresentation-180430060134.pptxshubhampresentation-180430060134.pptx
shubhampresentation-180430060134.pptx
ABINASHPADHY6
 
decisiontree-110906040745-phpapp01.pptx
decisiontree-110906040745-phpapp01.pptxdecisiontree-110906040745-phpapp01.pptx
decisiontree-110906040745-phpapp01.pptx
ABINASHPADHY6
 
Module 7_ Use Cases_ Blockchain Certification Training Course.pptx
Module 7_ Use Cases_ Blockchain Certification Training Course.pptxModule 7_ Use Cases_ Blockchain Certification Training Course.pptx
Module 7_ Use Cases_ Blockchain Certification Training Course.pptx
ABINASHPADHY6
 
collaborativefiltering-150228122057-conversion-gate02.pptx
collaborativefiltering-150228122057-conversion-gate02.pptxcollaborativefiltering-150228122057-conversion-gate02.pptx
collaborativefiltering-150228122057-conversion-gate02.pptx
ABINASHPADHY6
 
Chernick.Michael.ppt
Chernick.Michael.pptChernick.Michael.ppt
Chernick.Michael.ppt
ABINASHPADHY6
 
videorecommendationsystemfornewseducationandentertainment-170519183703.pptx
videorecommendationsystemfornewseducationandentertainment-170519183703.pptxvideorecommendationsystemfornewseducationandentertainment-170519183703.pptx
videorecommendationsystemfornewseducationandentertainment-170519183703.pptx
ABINASHPADHY6
 
log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...
log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...
log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...
ABINASHPADHY6
 
pcappt-140121072949-phpapp01.pptx
pcappt-140121072949-phpapp01.pptxpcappt-140121072949-phpapp01.pptx
pcappt-140121072949-phpapp01.pptx
ABINASHPADHY6
 
Lecture1_jps.ppt
Lecture1_jps.pptLecture1_jps.ppt
Lecture1_jps.ppt
ABINASHPADHY6
 
Culbert.ppt
Culbert.pptCulbert.ppt
Culbert.ppt
ABINASHPADHY6
 
Bootstrap.ppt
Bootstrap.pptBootstrap.ppt
Bootstrap.ppt
ABINASHPADHY6
 

More from ABINASHPADHY6 (20)

Untitled (2).pptxghjfgjfgjfghjghghjghghh
Untitled (2).pptxghjfgjfgjfghjghghjghghhUntitled (2).pptxghjfgjfgjfghjghghjghghh
Untitled (2).pptxghjfgjfgjfghjghghjghghh
 
Ankit Upadhyadfgdfgdfgy sdgdfgdfghdfgdfgdfg
Ankit Upadhyadfgdfgdfgy sdgdfgdfghdfgdfgdfgAnkit Upadhyadfgdfgdfgy sdgdfgdfghdfgdfgdfg
Ankit Upadhyadfgdfgdfgy sdgdfgdfghdfgdfgdfg
 
Rapid Guard PVC Doors (Ritul Joshi).pptx
Rapid Guard PVC Doors (Ritul Joshi).pptxRapid Guard PVC Doors (Ritul Joshi).pptx
Rapid Guard PVC Doors (Ritul Joshi).pptx
 
wqedfghj,hgfdgthjkjhgfdsdfgthujsdfrtghyu
wqedfghj,hgfdgthjkjhgfdsdfgthujsdfrtghyuwqedfghj,hgfdgthjkjhgfdsdfgthujsdfrtghyu
wqedfghj,hgfdgthjkjhgfdsdfgthujsdfrtghyu
 
Blue Shark Tech zsxdfghsdfghjsdfghjkdfghjkdfghjk
Blue Shark Tech zsxdfghsdfghjsdfghjkdfghjkdfghjkBlue Shark Tech zsxdfghsdfghjsdfghjkdfghjkdfghjk
Blue Shark Tech zsxdfghsdfghjsdfghjkdfghjkdfghjk
 
Types-of-Information-System.pptx
Types-of-Information-System.pptxTypes-of-Information-System.pptx
Types-of-Information-System.pptx
 
Ferns and Petals.pdf
Ferns and Petals.pdfFerns and Petals.pdf
Ferns and Petals.pdf
 
Coursera H5B26VDU9GSH.pdf
Coursera H5B26VDU9GSH.pdfCoursera H5B26VDU9GSH.pdf
Coursera H5B26VDU9GSH.pdf
 
Advertising &.pptx
Advertising &.pptxAdvertising &.pptx
Advertising &.pptx
 
shubhampresentation-180430060134.pptx
shubhampresentation-180430060134.pptxshubhampresentation-180430060134.pptx
shubhampresentation-180430060134.pptx
 
decisiontree-110906040745-phpapp01.pptx
decisiontree-110906040745-phpapp01.pptxdecisiontree-110906040745-phpapp01.pptx
decisiontree-110906040745-phpapp01.pptx
 
Module 7_ Use Cases_ Blockchain Certification Training Course.pptx
Module 7_ Use Cases_ Blockchain Certification Training Course.pptxModule 7_ Use Cases_ Blockchain Certification Training Course.pptx
Module 7_ Use Cases_ Blockchain Certification Training Course.pptx
 
collaborativefiltering-150228122057-conversion-gate02.pptx
collaborativefiltering-150228122057-conversion-gate02.pptxcollaborativefiltering-150228122057-conversion-gate02.pptx
collaborativefiltering-150228122057-conversion-gate02.pptx
 
Chernick.Michael.ppt
Chernick.Michael.pptChernick.Michael.ppt
Chernick.Michael.ppt
 
videorecommendationsystemfornewseducationandentertainment-170519183703.pptx
videorecommendationsystemfornewseducationandentertainment-170519183703.pptxvideorecommendationsystemfornewseducationandentertainment-170519183703.pptx
videorecommendationsystemfornewseducationandentertainment-170519183703.pptx
 
log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...
log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...
log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...
 
pcappt-140121072949-phpapp01.pptx
pcappt-140121072949-phpapp01.pptxpcappt-140121072949-phpapp01.pptx
pcappt-140121072949-phpapp01.pptx
 
Lecture1_jps.ppt
Lecture1_jps.pptLecture1_jps.ppt
Lecture1_jps.ppt
 
Culbert.ppt
Culbert.pptCulbert.ppt
Culbert.ppt
 
Bootstrap.ppt
Bootstrap.pptBootstrap.ppt
Bootstrap.ppt
 

Recently uploaded

Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 

Recently uploaded (20)

Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 

Bagging_and_Boosting.pptx

  • 1. Bagging and Boosting Amit Srinet Dave Snyder
  • 3. Bagging Bootstrap Model Randomly generate L set of cardinality N from the original set Z with replacement. Corrects the optimistic bias of R-Method "Bootstrap Aggregation" Create Bootstrap samples of a training set using sampling with replacement. Each bootstrap sample is used to train a different component of base classifier Classification is done by plurality voting
  • 4. Bagging Regression is done by averaging Works for unstable classifiers Neural Networks Decision Trees
  • 6. Example PR Tools: >> A = gendatb(500,1); >> scatterd(A) >> W1 = baggingc(A,treec,100,[],[]); >> plotc(W1(:,1:2),'r') >> W2 = baggingc(A,treec,100,treec,[]); >> plotc(W2) Generates 100 trees with default settings - stop based on purity metric, zero pruning
  • 7. Example Bagging: Decision Tree Decision boundary produced by one tree Training data
  • 8. Example Bagging: Decision Tree Decision boundary produced by a third tree Decision boundary produced by a second tree
  • 9. Example Three trees and final boundary Final result from bagging all trees. overlaid Bagging: Decision Tree
  • 10. Bagging: Neural Net Example Three neural nets generated with default settings [bpxnc] Final output from bagging 10 neural nets
  • 11. Why does bagging work ? Main reason for error in learning is due to noise ,bias and variance. Noise is error by the target function Bias is where the algorithm can not learn the target. Variance comes from the sampling, and how it affects the learning algorithm Does bagging minimizes these errors ? Yes Averaging over bootstrap samples can reduce error from variance especially in case of unstable classifiers
  • 12. Bagging In fact Ensemble reduces variance Let f(x) be the target value of x and h1 to hn be the set of base hypotheses and h- average be the prediction of base hypotheses E(h,x) = (f(x) – h(x))^2 Squared Error
  • 13. Ensemble Reduces variance Let f(x) be the target value for x. Let h1, . . . , hn be the base hypotheses. Let h-avg be the average prediction of h1, . . . , hn. Let E(h, x) = (f(x) −h(x))2 Is there any relation between h-avg and variance? yes
  • 14. E(h-avg,x) = ∑(i = 1 to n)E(hi ,x)/n ∑(i = 1 to n) (hi(x) – h-avg(x))^2/n That is squared error of the average prediction equals the average squared error of the base hypotheses minus the variance of the base hypotheses. Reference – 1-End of the slideshow.
  • 15. Bagging - Variants Random Forests A variant of bagging proposed by Breiman It’s a general class of ensemble building methods using a decision tree as base classifier. Classifier consisting of a collection of tree-structure classifiers. Each tree grown with a random vector Vk where k = 1,…L are independent and statistically distributed. Each tree cast a unit vote for the most popular class at input x.
  • 16. Boosting □Atechnique for combining multiple base classifiers whose combined performance is significantly better than that of any of the base classifiers. Sequential training of weak learners Each base classifier is trained on data that is weighted based on the performance of the previous classifier Each classifier votes to obtain a final outcome
  • 18. Boosting - Hedge(β) Boosting follows the model of online algorithm. Algorithm allocates weights to a set of strategies and used to predict the outcome of the certain event After each prediction the weights are redistributed. Correct strategies receive more weights while the weights of the incorrect strategies are reduced further. Relation with Boosting algorithm. Strategies corresponds to classifiers in the ensemble and the event will correspond to assigning a label to sample drawn randomly from the input.
  • 20. Boosting - AdaBoost Start with equally weighted data, apply first classifier Increase weights on misclassified data, apply second classifier Continue emphasizing misclassified data to subsequent classifiers until all classifiers have been trained
  • 22. Boosting - AdaBoost Training error: Kuncheva 7.2.4 In practice overfitting rarely occurs (Bishop) Bishop
  • 23. Margin Theory Testing error continues to decrease Ada-boost brought forward margin theory Margin for an object is related to certainty of its classification. Positive and large margin – correct classification Negative margin - Incorrect Classification Very small margin – Uncertainty in classification
  • 24. Similar classifier can give different label to an input. Margin of object x is calculated using the degree of support. Where
  • 25. Freund and schapire proved upper bounds on the testing error that depend on the margin Let H a finite space of base classifiers.For delta > 0 and theta > 0 with probability at least 1 –delta over the random choice of the training set Z, any classifier ensemble D {D1, . . . ,DL} ≤ H combined by the weighted average satisfies
  • 26. P(error ) = probability that the ensemble will make an error in labeling x drawn randomly from the distribution of the problem P(training margin < theta ) is the probabilty that the margin for a randomly drawn data point from a randomly drawn training set does not exceed theta
  • 27. Thus the main idea for boosting is to approximate the target by approximating the weight of the function. These weights can be seen as the min-max strategy of the game. Thus we can apply the notion of game theory for ada-boost. This idea has been discussed in the paper of freund and schpaire.
  • 28. Experiment PR Tools: >> A = gendatb(500, 1); >> [W,V,ALF] = adaboostc(A,qdc,20,[],1); >> scatterd(A) >> plotc(W) □ Uses Quadratic Bayes Normal Classifier with default settings, 20 iterations.
  • 29. Example AdaBoost: QDC Each QDC classification boundary (black), Final output (red) Final output of AdaBoost with 20 QDC classifiers
  • 30. Experiments AdaBoost: Decision Tree Final output of AdaBoost with 20 decision trees AdaBoost using 20 decision trees with default settings
  • 31. Experiments AdaBoost: Neural Net AdaBoost using 20 neural nets [bpxnc] default settings Final output of AdaBoost with 20 neural nets
  • 32. Bagging & Boosting Comparing bagging and boosting: Kuncheva
  • 33. References 1 - A. Krogh and J. Vedelsby (1995).Neural network ensembles, cross validation and activelearning. In D. S. Touretzky G. Tesauro and T. K. Leen, eds., Advances in Neural Information Processing Systems, pp. 231-238, MIT Press.