SlideShare a Scribd company logo
10
Most read
11
Most read
16
Most read
AI HACKERS
ENSEMBLE LEARNING
INTRODUCTION TO ENSEMBLE LEARNING
Definition
• An ensemble consists of a set of individually trained classifiers (such as neural networks or decision
trees) whose predictions are combined when classifying novel instances
Source: http://jair.org/papers/paper614.html
ENSEMBLE MODELS
Combine Model Predictions Into Ensemble Predictions
The three most popular methods for combining the predictions from different models are:
• Bagging. Building multiple models (typically of the same type) from different subsamples of the training
dataset.
• Boosting. Building multiple models (typically of the same type) each of which learns to fix the
prediction errors of a prior model in the chain.
• Voting. Building multiple models (typically of differing types) and simple statistics (like calculating the
mean) are used to combine predictions.
BAGGING
• performs best with algorithms that have high variance
• Operates via equal weighting of models
• Settles on result using majority voting
• Employs multiple instances of same classifier for one dataset
• Builds models of smaller datasets by sampling with replacement
• Works best when classifier is unstable (decision trees, for example), as this instability creates models of
differing accuracy and results to draw majority from
• Bagging can hurt stable model by introducing artificial variability from which to draw inaccurate
conclusions
UNDERSTANDING IRIS DATASET
BAGGING – DECISION TREE
BAGGING – IN SCIKIT LEARN
• model = BaggingClassifier(base_estimator=choice, n_estimators=X, random_state=seed)
• Where base_estimator can be classifier of our choice
• n_estimators = number of estimators you want to be build
• Random_state if you want to use seed to reproduce results using various different models
CROSS VALIDATION
kfold = model_selection.KFold(n_splits=n, random_state=seed)
RANDOM FOREST
• extension of bagged decision trees
• Samples of the training dataset are taken with replacement, but the trees are constructed in a way that
reduces the correlation between individual classifiers
• Thumbrule: All Not Features are selected
RANDOM FOREST V/S BAGGED FOREST
• Bagged Forest : All predictor variables are applied to each tree
• Random Forest: only a subset of predictor variables are applied to each tree and thus can help avoid in
overfitting
EXTRA TREES
• Similar to Random forest
• differ in the sense that the splits of the trees in the Random Forest are deterministic whereas they are random
in the case of an Extremely Randomized Trees
• the next split is the best split among random uniform splits in the selected variables for the current tree.
IMPACT:
contains a bias-variance analysis
ET being a bit worse when there is a high number of noisy features (in high dimensional data-sets)
Further reading: https://orbi.uliege.be/bitstream/2268/9357/1/geurts-mlj-advance.pdf
BOOSTING
• Instead of assigning equal weighting to models, boosting assigns varying weights to classifiers, and derives its ultimate result
based on weighted voting.
• Operates via weighted voting
• Algorithm proceeds iteratively; new models are influenced by previous ones
• New models become experts for instances classified incorrectly by earlier models
• Can be used without weights by using resampling, with probability determined by weights
• Works well if classifiers are not too complex
• Also works well with weak learners like decision trees
• Adaptive Boosting is a popular boosting algorithm – First successful boosting algorithm
• LogitBoost (derived from AdaBoost) is another, which uses additive logistic regression, and handles multi-class problems
• GradientBoosting is most sophisticated boosting algorithm
LOGIT BOOST V/S GRADIENT BOOST
• Gradient minimizes error using exponential loss function where as Logit Minimizes error using Logistics
regression function.
VOTING ENSEMBLE
• combining the predictions from multiple machine learning algorithms.
• Predictions of the sub-models can be weighted, but specifying the weights for classifiers manually or
even heuristically is difficult. More advanced methods can learn how to best weight the predictions
from submodels, but this is called stacking (stacked aggregation) and is currently not provided in scikit-
learn.
STACKING?
• Trains multiple learners (as opposed to bagging/boosting which train a single learner)
• Each learner uses a subset of data
• A "combiner" is trained on a validation segment
• Stacking uses a meta learner (as opposed to bagging/boosting which use voting schemes)
• Difficult to analyze theoretically ("black magic")
• Level-1 → meta learner
• Level-0 → base classifiers
• Can also be used for numeric prediction (regression)
• The best algorithms to use for base models are smooth, global learners
THANK YOU
• REFERENCES
• https://machinelearningmastery.com/ensemble-machine-learning-algorithms-python-scikit-learn/
• http://scikit-learn.org/stable/auto_examples/tree/plot_iris.html#sphx-glr-auto-examples-tree-plot-iris-
py

More Related Content

What's hot (20)

PPTX
Ensemble learning
Mustafa Sherazi
 
PPTX
CART – Classification & Regression Trees
Hemant Chetwani
 
PPTX
Lecture 6: Ensemble Methods
Marina Santini
 
PPTX
Decision Tree Learning
Md. Ariful Hoque
 
PPTX
Data Analysis: Evaluation Metrics for Supervised Learning Models of Machine L...
Md. Main Uddin Rony
 
PDF
Dimensionality Reduction
mrizwan969
 
PPTX
Support vector machines (svm)
Sharayu Patil
 
PPTX
Ensemble learning
Haris Jamil
 
PPTX
Overfitting & Underfitting
SOUMIT KAR
 
PPTX
Naive Bayes Presentation
Md. Enamul Haque Chowdhury
 
PPT
Support Vector machine
Anandha L Ranganathan
 
PDF
Linear regression
MartinHogg9
 
PPTX
Over fitting underfitting
SivapriyaS12
 
PDF
Feature Engineering
HJ van Veen
 
PPTX
Support vector machine
zekeLabs Technologies
 
PPTX
Regularization in deep learning
Kien Le
 
PPTX
Logistic Regression | Logistic Regression In Python | Machine Learning Algori...
Simplilearn
 
PPT
Decision tree and random forest
Lippo Group Digital
 
PPTX
Supervised and unsupervised learning
Paras Kohli
 
PDF
Logistic regression in Machine Learning
Kuppusamy P
 
Ensemble learning
Mustafa Sherazi
 
CART – Classification & Regression Trees
Hemant Chetwani
 
Lecture 6: Ensemble Methods
Marina Santini
 
Decision Tree Learning
Md. Ariful Hoque
 
Data Analysis: Evaluation Metrics for Supervised Learning Models of Machine L...
Md. Main Uddin Rony
 
Dimensionality Reduction
mrizwan969
 
Support vector machines (svm)
Sharayu Patil
 
Ensemble learning
Haris Jamil
 
Overfitting & Underfitting
SOUMIT KAR
 
Naive Bayes Presentation
Md. Enamul Haque Chowdhury
 
Support Vector machine
Anandha L Ranganathan
 
Linear regression
MartinHogg9
 
Over fitting underfitting
SivapriyaS12
 
Feature Engineering
HJ van Veen
 
Support vector machine
zekeLabs Technologies
 
Regularization in deep learning
Kien Le
 
Logistic Regression | Logistic Regression In Python | Machine Learning Algori...
Simplilearn
 
Decision tree and random forest
Lippo Group Digital
 
Supervised and unsupervised learning
Paras Kohli
 
Logistic regression in Machine Learning
Kuppusamy P
 

Similar to Ensemble learning Techniques (20)

PDF
L4. Ensembles of Decision Trees
Machine Learning Valencia
 
PDF
BaggingBoosting.pdf
DynamicPitch
 
PPTX
(Machine Learning) Ensemble learning
Omkar Rane
 
PDF
Boosting Algorithms Omar Odibat
omarodibat
 
PDF
Aaa ped-14-Ensemble Learning: About Ensemble Learning
AminaRepo
 
PDF
To bag, or to boost? A question of balance
Alex Henderson
 
PPT
Lecture -8 Classification(AdaBoost) .ppt
gadisaAdamu
 
PPTX
artifial intelligence notes of islamia university
ghulammuhammad83506
 
PPTX
Ensemble Models in machine learning.pptx
ssuser2b426d1
 
PPTX
Decision_Tree_Ensembles_Lecture.pptx Basics
ymanoj3
 
PDF
4_2_Ensemble models and gradient boosting2.pdf
Leonardo Auslender
 
PPTX
AIML UNIT 4.pptx. IT contains syllabus and full subject
NPRCET6
 
PDF
MLHEP 2015: Introductory Lecture #3
arogozhnikov
 
PDF
Ensemble Learning Notes for students of CS
Ravinder Kumar
 
PDF
DMTM Lecture 10 Classification ensembles
Pier Luca Lanzi
 
PPTX
Ensemble Learning.pptx machine learning1
pashamshashanthraopa
 
PDF
DMTM 2015 - 15 Classification Ensembles
Pier Luca Lanzi
 
PDF
4 2 ensemble models and grad boost part 1
Leonardo Auslender
 
PDF
Supervised Learning Ensemble Techniques Machine Learning
ShivarkarSandip
 
PDF
Machine Learning and Data Mining: 16 Classifiers Ensembles
Pier Luca Lanzi
 
L4. Ensembles of Decision Trees
Machine Learning Valencia
 
BaggingBoosting.pdf
DynamicPitch
 
(Machine Learning) Ensemble learning
Omkar Rane
 
Boosting Algorithms Omar Odibat
omarodibat
 
Aaa ped-14-Ensemble Learning: About Ensemble Learning
AminaRepo
 
To bag, or to boost? A question of balance
Alex Henderson
 
Lecture -8 Classification(AdaBoost) .ppt
gadisaAdamu
 
artifial intelligence notes of islamia university
ghulammuhammad83506
 
Ensemble Models in machine learning.pptx
ssuser2b426d1
 
Decision_Tree_Ensembles_Lecture.pptx Basics
ymanoj3
 
4_2_Ensemble models and gradient boosting2.pdf
Leonardo Auslender
 
AIML UNIT 4.pptx. IT contains syllabus and full subject
NPRCET6
 
MLHEP 2015: Introductory Lecture #3
arogozhnikov
 
Ensemble Learning Notes for students of CS
Ravinder Kumar
 
DMTM Lecture 10 Classification ensembles
Pier Luca Lanzi
 
Ensemble Learning.pptx machine learning1
pashamshashanthraopa
 
DMTM 2015 - 15 Classification Ensembles
Pier Luca Lanzi
 
4 2 ensemble models and grad boost part 1
Leonardo Auslender
 
Supervised Learning Ensemble Techniques Machine Learning
ShivarkarSandip
 
Machine Learning and Data Mining: 16 Classifiers Ensembles
Pier Luca Lanzi
 
Ad

More from Babu Priyavrat (8)

PDF
5G and Drones
Babu Priyavrat
 
PPTX
Tricks in natural language processing
Babu Priyavrat
 
PPTX
Lda and it's applications
Babu Priyavrat
 
PPTX
NLP using Deep learning
Babu Priyavrat
 
PPTX
Introduction to TensorFlow
Babu Priyavrat
 
PPTX
Neural network
Babu Priyavrat
 
PPTX
Supervised Machine Learning in R
Babu Priyavrat
 
PPTX
Introduction to-machine-learning
Babu Priyavrat
 
5G and Drones
Babu Priyavrat
 
Tricks in natural language processing
Babu Priyavrat
 
Lda and it's applications
Babu Priyavrat
 
NLP using Deep learning
Babu Priyavrat
 
Introduction to TensorFlow
Babu Priyavrat
 
Neural network
Babu Priyavrat
 
Supervised Machine Learning in R
Babu Priyavrat
 
Introduction to-machine-learning
Babu Priyavrat
 
Ad

Recently uploaded (20)

PPTX
GEN CHEM ACCURACY AND PRECISION eme.pptx
yeagere932
 
PPTX
Data Analysis for Business - make informed decisions, optimize performance, a...
Slidescope
 
PPTX
apidays Munich 2025 - Streamline & Secure LLM Traffic with APISIX AI Gateway ...
apidays
 
PPTX
Nursing Shift Supervisor 24/7 in a week .pptx
amjadtanveer
 
PPTX
things that used in cleaning of the things
drkaran1421
 
PDF
Dr. Robert Krug - Chief Data Scientist At DataInnovate Solutions
Dr. Robert Krug
 
PPTX
apidays Munich 2025 - Federated API Management and Governance, Vince Baker (D...
apidays
 
PPTX
Slide studies GC- CRC - PC - HNC baru.pptx
LLen8
 
PPTX
Introduction to Artificial Intelligence.pptx
StarToon1
 
PPTX
Insurance-Analytics-Branch-Dashboard (1).pptx
trivenisapate02
 
PDF
apidays Munich 2025 - Geospatial Artificial Intelligence (GeoAI) with OGC API...
apidays
 
PDF
apidays Munich 2025 - Let’s build, debug and test a magic MCP server in Postm...
apidays
 
PPTX
Lecture_9_EPROM_Flash univeristy lecture fall 2022
ssuser5047c5
 
PDF
Basotho Satisfaction with Electricity(Statspack)
KatlehoMefane
 
PPT
introdution to python with a very little difficulty
HUZAIFABINABDULLAH
 
PPTX
SRIJAN_Projecttttt_Report_Cover_PPT.pptx
SakshiLodhi9
 
PDF
apidays Munich 2025 - Developer Portals, API Catalogs, and Marketplaces, Miri...
apidays
 
PDF
apidays Munich 2025 - The Double Life of the API Product Manager, Emmanuel Pa...
apidays
 
PPTX
apidays Munich 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (Aavista Oy)
apidays
 
PDF
Introduction to Data Science_Washington_
StarToon1
 
GEN CHEM ACCURACY AND PRECISION eme.pptx
yeagere932
 
Data Analysis for Business - make informed decisions, optimize performance, a...
Slidescope
 
apidays Munich 2025 - Streamline & Secure LLM Traffic with APISIX AI Gateway ...
apidays
 
Nursing Shift Supervisor 24/7 in a week .pptx
amjadtanveer
 
things that used in cleaning of the things
drkaran1421
 
Dr. Robert Krug - Chief Data Scientist At DataInnovate Solutions
Dr. Robert Krug
 
apidays Munich 2025 - Federated API Management and Governance, Vince Baker (D...
apidays
 
Slide studies GC- CRC - PC - HNC baru.pptx
LLen8
 
Introduction to Artificial Intelligence.pptx
StarToon1
 
Insurance-Analytics-Branch-Dashboard (1).pptx
trivenisapate02
 
apidays Munich 2025 - Geospatial Artificial Intelligence (GeoAI) with OGC API...
apidays
 
apidays Munich 2025 - Let’s build, debug and test a magic MCP server in Postm...
apidays
 
Lecture_9_EPROM_Flash univeristy lecture fall 2022
ssuser5047c5
 
Basotho Satisfaction with Electricity(Statspack)
KatlehoMefane
 
introdution to python with a very little difficulty
HUZAIFABINABDULLAH
 
SRIJAN_Projecttttt_Report_Cover_PPT.pptx
SakshiLodhi9
 
apidays Munich 2025 - Developer Portals, API Catalogs, and Marketplaces, Miri...
apidays
 
apidays Munich 2025 - The Double Life of the API Product Manager, Emmanuel Pa...
apidays
 
apidays Munich 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (Aavista Oy)
apidays
 
Introduction to Data Science_Washington_
StarToon1
 

Ensemble learning Techniques

  • 2. INTRODUCTION TO ENSEMBLE LEARNING Definition • An ensemble consists of a set of individually trained classifiers (such as neural networks or decision trees) whose predictions are combined when classifying novel instances Source: http://jair.org/papers/paper614.html
  • 3. ENSEMBLE MODELS Combine Model Predictions Into Ensemble Predictions The three most popular methods for combining the predictions from different models are: • Bagging. Building multiple models (typically of the same type) from different subsamples of the training dataset. • Boosting. Building multiple models (typically of the same type) each of which learns to fix the prediction errors of a prior model in the chain. • Voting. Building multiple models (typically of differing types) and simple statistics (like calculating the mean) are used to combine predictions.
  • 4. BAGGING • performs best with algorithms that have high variance • Operates via equal weighting of models • Settles on result using majority voting • Employs multiple instances of same classifier for one dataset • Builds models of smaller datasets by sampling with replacement • Works best when classifier is unstable (decision trees, for example), as this instability creates models of differing accuracy and results to draw majority from • Bagging can hurt stable model by introducing artificial variability from which to draw inaccurate conclusions
  • 7. BAGGING – IN SCIKIT LEARN • model = BaggingClassifier(base_estimator=choice, n_estimators=X, random_state=seed) • Where base_estimator can be classifier of our choice • n_estimators = number of estimators you want to be build • Random_state if you want to use seed to reproduce results using various different models
  • 8. CROSS VALIDATION kfold = model_selection.KFold(n_splits=n, random_state=seed)
  • 9. RANDOM FOREST • extension of bagged decision trees • Samples of the training dataset are taken with replacement, but the trees are constructed in a way that reduces the correlation between individual classifiers • Thumbrule: All Not Features are selected
  • 10. RANDOM FOREST V/S BAGGED FOREST • Bagged Forest : All predictor variables are applied to each tree • Random Forest: only a subset of predictor variables are applied to each tree and thus can help avoid in overfitting
  • 11. EXTRA TREES • Similar to Random forest • differ in the sense that the splits of the trees in the Random Forest are deterministic whereas they are random in the case of an Extremely Randomized Trees • the next split is the best split among random uniform splits in the selected variables for the current tree. IMPACT: contains a bias-variance analysis ET being a bit worse when there is a high number of noisy features (in high dimensional data-sets) Further reading: https://orbi.uliege.be/bitstream/2268/9357/1/geurts-mlj-advance.pdf
  • 12. BOOSTING • Instead of assigning equal weighting to models, boosting assigns varying weights to classifiers, and derives its ultimate result based on weighted voting. • Operates via weighted voting • Algorithm proceeds iteratively; new models are influenced by previous ones • New models become experts for instances classified incorrectly by earlier models • Can be used without weights by using resampling, with probability determined by weights • Works well if classifiers are not too complex • Also works well with weak learners like decision trees • Adaptive Boosting is a popular boosting algorithm – First successful boosting algorithm • LogitBoost (derived from AdaBoost) is another, which uses additive logistic regression, and handles multi-class problems • GradientBoosting is most sophisticated boosting algorithm
  • 13. LOGIT BOOST V/S GRADIENT BOOST • Gradient minimizes error using exponential loss function where as Logit Minimizes error using Logistics regression function.
  • 14. VOTING ENSEMBLE • combining the predictions from multiple machine learning algorithms. • Predictions of the sub-models can be weighted, but specifying the weights for classifiers manually or even heuristically is difficult. More advanced methods can learn how to best weight the predictions from submodels, but this is called stacking (stacked aggregation) and is currently not provided in scikit- learn.
  • 15. STACKING? • Trains multiple learners (as opposed to bagging/boosting which train a single learner) • Each learner uses a subset of data • A "combiner" is trained on a validation segment • Stacking uses a meta learner (as opposed to bagging/boosting which use voting schemes) • Difficult to analyze theoretically ("black magic") • Level-1 → meta learner • Level-0 → base classifiers • Can also be used for numeric prediction (regression) • The best algorithms to use for base models are smooth, global learners
  • 16. THANK YOU • REFERENCES • https://machinelearningmastery.com/ensemble-machine-learning-algorithms-python-scikit-learn/ • http://scikit-learn.org/stable/auto_examples/tree/plot_iris.html#sphx-glr-auto-examples-tree-plot-iris- py