SlideShare a Scribd company logo
1 of 20
BY
International School of Engineering
{We Are Applied Engineering}
Disclaimer: Some of the Images and content have been taken from multiple online sources and this presentation is
intended only for knowledge sharing but not for any commercial business intention
OVERVIEW
• DEFINITION OF DECISIONTREE
• WHY DECISIONTREE?
• DECISIONTREETERMS
• EASY EXAMPLE
• CONSTRUCTING A DECISION
TREE
• CALCULATION OF ENTROPY
• ENTROPY
• TERMINATION CRITERIA
• PRUNINGTREES
• APPROACHES TO PRUNETREE
• DECISIONTREE ALGORITHMS
• LIMITATIONS
• ADVANTAGES
• VIDEO OF CONSTRUCTING A
DECISIONTREE
DEFINITION OF ‘DECISIONTREE'
 A decision tree is a natural and simple way of inducing following kind of rules.
If (Age is x) and (income is y) and (family size is z) and (credit card
spending is p) then he will accept the loan
 It is powerful and perhaps most widely used modeling technique of all
 Decision trees classify instances by sorting them down the tree from the root to some leaf
node, which provides the classification of the instance
WHY DECISIONTREE?
Source: http://www.simafore.com/blog/bid/62482/2-main-differences-between-classification-and-regression-trees
Decision Trees
To Classify
Response variable has
only two categories
Use standard
classification tree
Response variable has
multiple categories
Use c4.5
implementation
To Predict
Response variable is
continuous
Linear relationships
between predictors
and response
Use standard
Regression tree
Nonlinear relationships
between predictors and
response
Use c4.5
implementation
DECISIONTREETERMS
Root Node
Condition Check
Leaf Node(Decision Point)
Leaf Node(Decision Point)
Condition Check
Branch Branch
EASY EXAMPLE
 Joe’s garage is considering hiring another mechanic.
 The mechanic would cost them an additional $50,000 / year in salary and
benefits.
 If there are a lot of accidents in Iowa City this year, they anticipate making an
additional $75,000 in net revenue.
 If there are not a lot of accidents, they could lose $20,000 off of last year’s total
net revenues.
 Because of all the ice on the roads, Joe thinks that there will be a 70% chance of
“a lot of accidents” and a 30% chance of “fewer accidents”.
 Assume if he doesn’t expand he will have the same revenue as last year.
Joe’s Garage Hiring a
mechanic
Hire a new mechanic
Cost = $50,000
70% of an chance
increase in accidents
Profit = $70,000
30% of a chance
decrease in accidents
Profit = -$20,000
Don’t hire a mechanic
Cost = $0
• Estimated value of “Hire Mechanic” =
NPV =.7(70,000) + .3(- $20,000) - $50,000 = - $7,000
• Therefore you should not hire the mechanic
continued
CONSTRUCTING A DECISIONTREE
 Which attribute to choose?
 Information Gain
ENTROPY
 Where to stop?
 Termination criteria
Two Aspects
CALCULATION OF ENTROPY
 Entropy is a measure of uncertainty in the data
Entropy(S) = ∑(i=1 to l)-|Si|/|S| * log2(|Si|/|S|)
S = set of examples
Si = subset of S with value vi under the target attribute
l = size of the range of the target attribute
ENTROPY
 Let us say, I am considering an action like a coin toss. Say, I have five coins with probabilities
for heads 0, 0.25, 0.5, 0.75 and 1. When I toss them which one has highest uncertainty and
which one has the least?
H = − 𝑖𝑝𝑖 log2 𝑝𝑖
 Information gain = Entropy of the system before split – Entropy
of the system after split
ENTROPY: MEASURE OF RANDOMNESS
TERMINATION CRITERIA
 All the records at the node belong to one class
 A significant majority fraction of records belong to a single class
 The segment contains only one or very small number of records
 The improvement is not substantial enough to warrant making the split
PRUNINGTREES
 The decision trees can be grown deeply enough to perfectly classify the training examples
which leads to overfitting when there is noise in the data
 When the number of training examples is too small to produce a representative sample of
the true target function.
 Practically, pruning is not important for classification
APPROACHES TO PRUNETREE
 Three approaches
–Stop growing the tree earlier, before it reaches the point
where it perfectly classifies the training data,
–Allow the tree to over fit the data, and then post-prune the
tree.
–Allow the tree to over fit the data, transform the tree to rules
and then post-prune the rules.
 Pessimistic pruning
Take the upper bound error at the node and sub-trees
e= [f+
𝑧2
2𝑁
+z
𝑓
𝑁
−
𝑓2
𝑁
+
𝑧2
4𝑁2]/[1+
𝑧2
𝑁
]
 Cost complexity pruning
J(Tree, S) = ErrorRate(Tree, S) + a |Tree|
Play with several values a starting from 0
Do a K-fold validation on all of them and find the best pruning α
TWO MOST POPULAR
DECISIONTREE ALGORITHMS
 Cart
–Binary split
–Gini index
–Cost complexity pruning
 C5.0
–Multi split
–Info gain
–pessimistic pruning
LIMITATIONS
 Class imbalance
 When there are more records and very less number of attributes/features
ADVANTAGES
 They are fast
 Robust
 Requires very little experimentation
 You may also build some intuitions about your customer base. E.g. “Are customers with
different family sizes truly different?
For Detailed Description on
CONSTRUCTING A DECISION TREE
with example
Check out our video
Plot no 63/A, 1st Floor, Road No 13, Film Nagar, Jubilee
Hills, Hyderabad-500033
For Individuals (+91) 9502334561/62
For Corporates (+91) 9618 483 483
Facebook: www.facebook.com/insofe
Slide share: www.slideshare.net/INSOFE
International School of Engineering

More Related Content

What's hot

Random forest
Random forestRandom forest
Random forestUjjawal
 
Data mining technique (decision tree)
Data mining technique (decision tree)Data mining technique (decision tree)
Data mining technique (decision tree)Shweta Ghate
 
Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...
Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...
Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...Simplilearn
 
Random forest algorithm
Random forest algorithmRandom forest algorithm
Random forest algorithmRashid Ansari
 
Machine Learning with Decision trees
Machine Learning with Decision treesMachine Learning with Decision trees
Machine Learning with Decision treesKnoldus Inc.
 
Random Forest and KNN is fun
Random Forest and KNN is funRandom Forest and KNN is fun
Random Forest and KNN is funZhen Li
 
CART – Classification & Regression Trees
CART – Classification & Regression TreesCART – Classification & Regression Trees
CART – Classification & Regression TreesHemant Chetwani
 
Understanding random forests
Understanding random forestsUnderstanding random forests
Understanding random forestsMarc Garcia
 
Decision Tree Algorithm With Example | Decision Tree In Machine Learning | Da...
Decision Tree Algorithm With Example | Decision Tree In Machine Learning | Da...Decision Tree Algorithm With Example | Decision Tree In Machine Learning | Da...
Decision Tree Algorithm With Example | Decision Tree In Machine Learning | Da...Simplilearn
 
Introduction to Random Forest
Introduction to Random Forest Introduction to Random Forest
Introduction to Random Forest Rupak Roy
 
Decision Trees for Classification: A Machine Learning Algorithm
Decision Trees for Classification: A Machine Learning AlgorithmDecision Trees for Classification: A Machine Learning Algorithm
Decision Trees for Classification: A Machine Learning AlgorithmPalin analytics
 

What's hot (20)

Random forest
Random forestRandom forest
Random forest
 
Decision tree
Decision treeDecision tree
Decision tree
 
Data mining technique (decision tree)
Data mining technique (decision tree)Data mining technique (decision tree)
Data mining technique (decision tree)
 
Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...
Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...
Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...
 
Random forest algorithm
Random forest algorithmRandom forest algorithm
Random forest algorithm
 
Decision tree
Decision treeDecision tree
Decision tree
 
Machine Learning with Decision trees
Machine Learning with Decision treesMachine Learning with Decision trees
Machine Learning with Decision trees
 
Decision tree
Decision treeDecision tree
Decision tree
 
Decision tree and random forest
Decision tree and random forestDecision tree and random forest
Decision tree and random forest
 
Decision tree
Decision tree Decision tree
Decision tree
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
 
Random Forest and KNN is fun
Random Forest and KNN is funRandom Forest and KNN is fun
Random Forest and KNN is fun
 
CART – Classification & Regression Trees
CART – Classification & Regression TreesCART – Classification & Regression Trees
CART – Classification & Regression Trees
 
Understanding random forests
Understanding random forestsUnderstanding random forests
Understanding random forests
 
Random forest
Random forestRandom forest
Random forest
 
Decision Tree Algorithm With Example | Decision Tree In Machine Learning | Da...
Decision Tree Algorithm With Example | Decision Tree In Machine Learning | Da...Decision Tree Algorithm With Example | Decision Tree In Machine Learning | Da...
Decision Tree Algorithm With Example | Decision Tree In Machine Learning | Da...
 
Introduction to Random Forest
Introduction to Random Forest Introduction to Random Forest
Introduction to Random Forest
 
K means Clustering Algorithm
K means Clustering AlgorithmK means Clustering Algorithm
K means Clustering Algorithm
 
Tree pruning
 Tree pruning Tree pruning
Tree pruning
 
Decision Trees for Classification: A Machine Learning Algorithm
Decision Trees for Classification: A Machine Learning AlgorithmDecision Trees for Classification: A Machine Learning Algorithm
Decision Trees for Classification: A Machine Learning Algorithm
 

Viewers also liked

FSU SLIS Wk 8 Intro to Info Services - Ready Reference
FSU SLIS Wk 8 Intro to Info Services - Ready ReferenceFSU SLIS Wk 8 Intro to Info Services - Ready Reference
FSU SLIS Wk 8 Intro to Info Services - Ready ReferenceLorri Mon
 
Pareto optimal
Pareto optimal    Pareto optimal
Pareto optimal rmpas
 
Part 6 (machine learning overview) what makes a problem tough continued
Part 6 (machine learning overview)   what makes a problem tough continuedPart 6 (machine learning overview)   what makes a problem tough continued
Part 6 (machine learning overview) what makes a problem tough continuedInternational School of Engineering
 
Intelligent Decision Support Systems
Intelligent Decision Support SystemsIntelligent Decision Support Systems
Intelligent Decision Support SystemsGildardo Sanchez-Ante
 
Decision Support Systems
Decision Support SystemsDecision Support Systems
Decision Support Systemsluzenith_g
 
Types of decision support system
Types of decision support systemTypes of decision support system
Types of decision support systemnripeshkumarnrip
 
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain Ratio
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain RatioLecture 4 Decision Trees (2): Entropy, Information Gain, Gain Ratio
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain RatioMarina Santini
 

Viewers also liked (20)

Decision tree example problem
Decision tree example problemDecision tree example problem
Decision tree example problem
 
Apriori Algorithm
Apriori AlgorithmApriori Algorithm
Apriori Algorithm
 
FSU SLIS Wk 8 Intro to Info Services - Ready Reference
FSU SLIS Wk 8 Intro to Info Services - Ready ReferenceFSU SLIS Wk 8 Intro to Info Services - Ready Reference
FSU SLIS Wk 8 Intro to Info Services - Ready Reference
 
Part 4 (machine learning overview) solution architecture
Part 4 (machine learning overview)   solution architecturePart 4 (machine learning overview)   solution architecture
Part 4 (machine learning overview) solution architecture
 
Mini project1 team5
Mini project1 team5Mini project1 team5
Mini project1 team5
 
Pareto optimality
Pareto optimalityPareto optimality
Pareto optimality
 
Pareto optimal
Pareto optimal    Pareto optimal
Pareto optimal
 
Part 6 (machine learning overview) what makes a problem tough continued
Part 6 (machine learning overview)   what makes a problem tough continuedPart 6 (machine learning overview)   what makes a problem tough continued
Part 6 (machine learning overview) what makes a problem tough continued
 
Engineering Big Data with Hadoop
Engineering Big Data with HadoopEngineering Big Data with Hadoop
Engineering Big Data with Hadoop
 
Intelligent Decision Support Systems
Intelligent Decision Support SystemsIntelligent Decision Support Systems
Intelligent Decision Support Systems
 
Part 5 (machine learning overview) what makes a problem tough
Part 5 (machine learning overview)   what makes a problem toughPart 5 (machine learning overview)   what makes a problem tough
Part 5 (machine learning overview) what makes a problem tough
 
Scope and Career in Analytics
Scope and Career in AnalyticsScope and Career in Analytics
Scope and Career in Analytics
 
Decision Support Systems
Decision Support SystemsDecision Support Systems
Decision Support Systems
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
 
Decision trees
Decision treesDecision trees
Decision trees
 
Discriminant analysis
Discriminant analysisDiscriminant analysis
Discriminant analysis
 
Types of decision support system
Types of decision support systemTypes of decision support system
Types of decision support system
 
Decision support system
Decision support systemDecision support system
Decision support system
 
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain Ratio
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain RatioLecture 4 Decision Trees (2): Entropy, Information Gain, Gain Ratio
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain Ratio
 
Discriminant analysis
Discriminant analysisDiscriminant analysis
Discriminant analysis
 

Similar to Decision Trees

Slide3.ppt
Slide3.pptSlide3.ppt
Slide3.pptbutest
 
Simple rules for building robust machine learning models
Simple rules for building robust machine learning modelsSimple rules for building robust machine learning models
Simple rules for building robust machine learning modelsKyriakos Chatzidimitriou
 
Introduction to machine learning and model building using linear regression
Introduction to machine learning and model building using linear regressionIntroduction to machine learning and model building using linear regression
Introduction to machine learning and model building using linear regressionGirish Gore
 
Random Decision Forests at Scale
Random Decision Forests at ScaleRandom Decision Forests at Scale
Random Decision Forests at ScaleCloudera, Inc.
 
Echelon Asia Summit 2017 Startup Academy Workshop
Echelon Asia Summit 2017 Startup Academy WorkshopEchelon Asia Summit 2017 Startup Academy Workshop
Echelon Asia Summit 2017 Startup Academy WorkshopGarrett Teoh Hor Keong
 
What are the odds of making that number risk analysis with crystal ball - O...
What are the odds of making that number   risk analysis with crystal ball - O...What are the odds of making that number   risk analysis with crystal ball - O...
What are the odds of making that number risk analysis with crystal ball - O...p6academy
 
Machine Learning in the Financial Industry
Machine Learning in the Financial IndustryMachine Learning in the Financial Industry
Machine Learning in the Financial IndustrySubrat Panda, PhD
 
Top 3 Considerations for Machine Learning on Big Data
Top 3 Considerations for Machine Learning on Big DataTop 3 Considerations for Machine Learning on Big Data
Top 3 Considerations for Machine Learning on Big DataDatameer
 
Fraud Detection by Stacking Cost-Sensitive Decision Trees
Fraud Detection by Stacking Cost-Sensitive Decision TreesFraud Detection by Stacking Cost-Sensitive Decision Trees
Fraud Detection by Stacking Cost-Sensitive Decision TreesAlejandro Correa Bahnsen, PhD
 
Machine learning overview (with SAS software)
Machine learning overview (with SAS software)Machine learning overview (with SAS software)
Machine learning overview (with SAS software)Longhow Lam
 
Decision Tree Algorithm & Analysis | Machine Learning Algorithm | Data Scienc...
Decision Tree Algorithm & Analysis | Machine Learning Algorithm | Data Scienc...Decision Tree Algorithm & Analysis | Machine Learning Algorithm | Data Scienc...
Decision Tree Algorithm & Analysis | Machine Learning Algorithm | Data Scienc...Edureka!
 
A General Framework for Accurate and Fast Regression by Data Summarization in...
A General Framework for Accurate and Fast Regression by Data Summarization in...A General Framework for Accurate and Fast Regression by Data Summarization in...
A General Framework for Accurate and Fast Regression by Data Summarization in...Yao Wu
 
Decision theory
Decision theoryDecision theory
Decision theorySurekha98
 
Course Project for Coursera Practical Machine Learning
Course Project for Coursera Practical Machine LearningCourse Project for Coursera Practical Machine Learning
Course Project for Coursera Practical Machine LearningJohn Edward Slough II
 
Machine Learning part 3 - Introduction to data science
Machine Learning part 3 - Introduction to data science Machine Learning part 3 - Introduction to data science
Machine Learning part 3 - Introduction to data science Frank Kienle
 
Data Driven Risk Management
Data Driven Risk ManagementData Driven Risk Management
Data Driven Risk ManagementResolver Inc.
 

Similar to Decision Trees (20)

Slide3.ppt
Slide3.pptSlide3.ppt
Slide3.ppt
 
Simple rules for building robust machine learning models
Simple rules for building robust machine learning modelsSimple rules for building robust machine learning models
Simple rules for building robust machine learning models
 
Introduction to machine learning and model building using linear regression
Introduction to machine learning and model building using linear regressionIntroduction to machine learning and model building using linear regression
Introduction to machine learning and model building using linear regression
 
Random Decision Forests at Scale
Random Decision Forests at ScaleRandom Decision Forests at Scale
Random Decision Forests at Scale
 
Echelon Asia Summit 2017 Startup Academy Workshop
Echelon Asia Summit 2017 Startup Academy WorkshopEchelon Asia Summit 2017 Startup Academy Workshop
Echelon Asia Summit 2017 Startup Academy Workshop
 
What are the odds of making that number risk analysis with crystal ball - O...
What are the odds of making that number   risk analysis with crystal ball - O...What are the odds of making that number   risk analysis with crystal ball - O...
What are the odds of making that number risk analysis with crystal ball - O...
 
Machine_Learning.pptx
Machine_Learning.pptxMachine_Learning.pptx
Machine_Learning.pptx
 
Machine Learning in the Financial Industry
Machine Learning in the Financial IndustryMachine Learning in the Financial Industry
Machine Learning in the Financial Industry
 
Top 3 Considerations for Machine Learning on Big Data
Top 3 Considerations for Machine Learning on Big DataTop 3 Considerations for Machine Learning on Big Data
Top 3 Considerations for Machine Learning on Big Data
 
Fraud Detection by Stacking Cost-Sensitive Decision Trees
Fraud Detection by Stacking Cost-Sensitive Decision TreesFraud Detection by Stacking Cost-Sensitive Decision Trees
Fraud Detection by Stacking Cost-Sensitive Decision Trees
 
Machine learning overview (with SAS software)
Machine learning overview (with SAS software)Machine learning overview (with SAS software)
Machine learning overview (with SAS software)
 
Decision Tree Algorithm & Analysis | Machine Learning Algorithm | Data Scienc...
Decision Tree Algorithm & Analysis | Machine Learning Algorithm | Data Scienc...Decision Tree Algorithm & Analysis | Machine Learning Algorithm | Data Scienc...
Decision Tree Algorithm & Analysis | Machine Learning Algorithm | Data Scienc...
 
A General Framework for Accurate and Fast Regression by Data Summarization in...
A General Framework for Accurate and Fast Regression by Data Summarization in...A General Framework for Accurate and Fast Regression by Data Summarization in...
A General Framework for Accurate and Fast Regression by Data Summarization in...
 
Decision theory & decisiontrees
Decision theory & decisiontreesDecision theory & decisiontrees
Decision theory & decisiontrees
 
Mini datathon
Mini datathonMini datathon
Mini datathon
 
Decision theory
Decision theoryDecision theory
Decision theory
 
Course Project for Coursera Practical Machine Learning
Course Project for Coursera Practical Machine LearningCourse Project for Coursera Practical Machine Learning
Course Project for Coursera Practical Machine Learning
 
Intro to ml_2021
Intro to ml_2021Intro to ml_2021
Intro to ml_2021
 
Machine Learning part 3 - Introduction to data science
Machine Learning part 3 - Introduction to data science Machine Learning part 3 - Introduction to data science
Machine Learning part 3 - Introduction to data science
 
Data Driven Risk Management
Data Driven Risk ManagementData Driven Risk Management
Data Driven Risk Management
 

More from International School of Engineering

Part 2 (machine learning overview) all machine learning is pattern search
Part 2 (machine learning overview)   all machine learning is pattern searchPart 2 (machine learning overview)   all machine learning is pattern search
Part 2 (machine learning overview) all machine learning is pattern searchInternational School of Engineering
 
Part 2 (machine learning overview) all machine learning is pattern search
Part 2 (machine learning overview)   all machine learning is pattern searchPart 2 (machine learning overview)   all machine learning is pattern search
Part 2 (machine learning overview) all machine learning is pattern searchInternational School of Engineering
 
Fast Track Machine Learning Part 1 (Machine Learning Overview) - Types of Mac...
Fast Track Machine Learning Part 1 (Machine Learning Overview) - Types of Mac...Fast Track Machine Learning Part 1 (Machine Learning Overview) - Types of Mac...
Fast Track Machine Learning Part 1 (Machine Learning Overview) - Types of Mac...International School of Engineering
 

More from International School of Engineering (12)

Part 3 (machine learning overview) the forms of knowledge
Part 3 (machine learning overview)   the forms of knowledgePart 3 (machine learning overview)   the forms of knowledge
Part 3 (machine learning overview) the forms of knowledge
 
Part 2 (machine learning overview) all machine learning is pattern search
Part 2 (machine learning overview)   all machine learning is pattern searchPart 2 (machine learning overview)   all machine learning is pattern search
Part 2 (machine learning overview) all machine learning is pattern search
 
Part 4 (machine learning overview) solution architecture
Part 4 (machine learning overview)   solution architecturePart 4 (machine learning overview)   solution architecture
Part 4 (machine learning overview) solution architecture
 
Part 3 (machine learning overview) the forms of knowledge
Part 3 (machine learning overview)   the forms of knowledgePart 3 (machine learning overview)   the forms of knowledge
Part 3 (machine learning overview) the forms of knowledge
 
Part 2 (machine learning overview) all machine learning is pattern search
Part 2 (machine learning overview)   all machine learning is pattern searchPart 2 (machine learning overview)   all machine learning is pattern search
Part 2 (machine learning overview) all machine learning is pattern search
 
Fast Track Machine Learning Part 1 (Machine Learning Overview) - Types of Mac...
Fast Track Machine Learning Part 1 (Machine Learning Overview) - Types of Mac...Fast Track Machine Learning Part 1 (Machine Learning Overview) - Types of Mac...
Fast Track Machine Learning Part 1 (Machine Learning Overview) - Types of Mac...
 
Service assurance with predictive analytics
Service assurance with predictive analyticsService assurance with predictive analytics
Service assurance with predictive analytics
 
Analytics in Supply Chain Management
Analytics in Supply Chain ManagementAnalytics in Supply Chain Management
Analytics in Supply Chain Management
 
Health Care Analytics
Health Care AnalyticsHealth Care Analytics
Health Care Analytics
 
Analytics in the Manufacturing industry
Analytics in the Manufacturing industryAnalytics in the Manufacturing industry
Analytics in the Manufacturing industry
 
Analytics in Pharmaceutical Industry
Analytics in Pharmaceutical IndustryAnalytics in Pharmaceutical Industry
Analytics in Pharmaceutical Industry
 
Fraud detection
Fraud detectionFraud detection
Fraud detection
 

Recently uploaded

CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023ymrp368
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...shivangimorya083
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...amitlee9823
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...shambhavirathore45
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxMohammedJunaid861692
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Delhi Call girls
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 

Recently uploaded (20)

CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 

Decision Trees

  • 1. BY International School of Engineering {We Are Applied Engineering} Disclaimer: Some of the Images and content have been taken from multiple online sources and this presentation is intended only for knowledge sharing but not for any commercial business intention
  • 2. OVERVIEW • DEFINITION OF DECISIONTREE • WHY DECISIONTREE? • DECISIONTREETERMS • EASY EXAMPLE • CONSTRUCTING A DECISION TREE • CALCULATION OF ENTROPY • ENTROPY • TERMINATION CRITERIA • PRUNINGTREES • APPROACHES TO PRUNETREE • DECISIONTREE ALGORITHMS • LIMITATIONS • ADVANTAGES • VIDEO OF CONSTRUCTING A DECISIONTREE
  • 3. DEFINITION OF ‘DECISIONTREE'  A decision tree is a natural and simple way of inducing following kind of rules. If (Age is x) and (income is y) and (family size is z) and (credit card spending is p) then he will accept the loan  It is powerful and perhaps most widely used modeling technique of all  Decision trees classify instances by sorting them down the tree from the root to some leaf node, which provides the classification of the instance
  • 4. WHY DECISIONTREE? Source: http://www.simafore.com/blog/bid/62482/2-main-differences-between-classification-and-regression-trees Decision Trees To Classify Response variable has only two categories Use standard classification tree Response variable has multiple categories Use c4.5 implementation To Predict Response variable is continuous Linear relationships between predictors and response Use standard Regression tree Nonlinear relationships between predictors and response Use c4.5 implementation
  • 5. DECISIONTREETERMS Root Node Condition Check Leaf Node(Decision Point) Leaf Node(Decision Point) Condition Check Branch Branch
  • 6. EASY EXAMPLE  Joe’s garage is considering hiring another mechanic.  The mechanic would cost them an additional $50,000 / year in salary and benefits.  If there are a lot of accidents in Iowa City this year, they anticipate making an additional $75,000 in net revenue.  If there are not a lot of accidents, they could lose $20,000 off of last year’s total net revenues.  Because of all the ice on the roads, Joe thinks that there will be a 70% chance of “a lot of accidents” and a 30% chance of “fewer accidents”.  Assume if he doesn’t expand he will have the same revenue as last year.
  • 7. Joe’s Garage Hiring a mechanic Hire a new mechanic Cost = $50,000 70% of an chance increase in accidents Profit = $70,000 30% of a chance decrease in accidents Profit = -$20,000 Don’t hire a mechanic Cost = $0 • Estimated value of “Hire Mechanic” = NPV =.7(70,000) + .3(- $20,000) - $50,000 = - $7,000 • Therefore you should not hire the mechanic continued
  • 8. CONSTRUCTING A DECISIONTREE  Which attribute to choose?  Information Gain ENTROPY  Where to stop?  Termination criteria Two Aspects
  • 9. CALCULATION OF ENTROPY  Entropy is a measure of uncertainty in the data Entropy(S) = ∑(i=1 to l)-|Si|/|S| * log2(|Si|/|S|) S = set of examples Si = subset of S with value vi under the target attribute l = size of the range of the target attribute
  • 10. ENTROPY  Let us say, I am considering an action like a coin toss. Say, I have five coins with probabilities for heads 0, 0.25, 0.5, 0.75 and 1. When I toss them which one has highest uncertainty and which one has the least? H = − 𝑖𝑝𝑖 log2 𝑝𝑖  Information gain = Entropy of the system before split – Entropy of the system after split
  • 11. ENTROPY: MEASURE OF RANDOMNESS
  • 12. TERMINATION CRITERIA  All the records at the node belong to one class  A significant majority fraction of records belong to a single class  The segment contains only one or very small number of records  The improvement is not substantial enough to warrant making the split
  • 13. PRUNINGTREES  The decision trees can be grown deeply enough to perfectly classify the training examples which leads to overfitting when there is noise in the data  When the number of training examples is too small to produce a representative sample of the true target function.  Practically, pruning is not important for classification
  • 14. APPROACHES TO PRUNETREE  Three approaches –Stop growing the tree earlier, before it reaches the point where it perfectly classifies the training data, –Allow the tree to over fit the data, and then post-prune the tree. –Allow the tree to over fit the data, transform the tree to rules and then post-prune the rules.
  • 15.  Pessimistic pruning Take the upper bound error at the node and sub-trees e= [f+ 𝑧2 2𝑁 +z 𝑓 𝑁 − 𝑓2 𝑁 + 𝑧2 4𝑁2]/[1+ 𝑧2 𝑁 ]  Cost complexity pruning J(Tree, S) = ErrorRate(Tree, S) + a |Tree| Play with several values a starting from 0 Do a K-fold validation on all of them and find the best pruning α
  • 16. TWO MOST POPULAR DECISIONTREE ALGORITHMS  Cart –Binary split –Gini index –Cost complexity pruning  C5.0 –Multi split –Info gain –pessimistic pruning
  • 17. LIMITATIONS  Class imbalance  When there are more records and very less number of attributes/features
  • 18. ADVANTAGES  They are fast  Robust  Requires very little experimentation  You may also build some intuitions about your customer base. E.g. “Are customers with different family sizes truly different?
  • 19. For Detailed Description on CONSTRUCTING A DECISION TREE with example Check out our video
  • 20. Plot no 63/A, 1st Floor, Road No 13, Film Nagar, Jubilee Hills, Hyderabad-500033 For Individuals (+91) 9502334561/62 For Corporates (+91) 9618 483 483 Facebook: www.facebook.com/insofe Slide share: www.slideshare.net/INSOFE International School of Engineering