SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Classification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsClassification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsMd. Main Uddin Rony
 
Classification and Regression
Classification and RegressionClassification and Regression
Classification and RegressionMegha Sharma
 
Slide3.ppt
Slide3.pptSlide3.ppt
Slide3.pptbutest
 
Classification in data mining
Classification in data mining Classification in data mining
Classification in data mining Sulman Ahmed
 
Decision trees in Machine Learning
Decision trees in Machine Learning Decision trees in Machine Learning
Decision trees in Machine Learning Mohammad Junaid Khan
 
Decision tree induction \ Decision Tree Algorithm with Example| Data science
Decision tree induction \ Decision Tree Algorithm with Example| Data scienceDecision tree induction \ Decision Tree Algorithm with Example| Data science
Decision tree induction \ Decision Tree Algorithm with Example| Data scienceMaryamRehman6
 
Decision Trees
Decision TreesDecision Trees
Decision TreesStudent
 
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
 
2.2 decision tree
2.2 decision tree2.2 decision tree
2.2 decision treeKrish_ver2
 
Understanding Bagging and Boosting
Understanding Bagging and BoostingUnderstanding Bagging and Boosting
Understanding Bagging and BoostingMohit Rajput
 
Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests Derek Kane
 
Decision tree lecture 3
Decision tree lecture 3Decision tree lecture 3
Decision tree lecture 3Laila Fatehy
 
05 Clustering in Data Mining
05 Clustering in Data Mining05 Clustering in Data Mining
05 Clustering in Data MiningValerii Klymchuk
 
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
 
Data mining technique (decision tree)
Data mining technique (decision tree)Data mining technique (decision tree)
Data mining technique (decision tree)Shweta Ghate
 
Chapter 4 Classification
Chapter 4 ClassificationChapter 4 Classification
Chapter 4 ClassificationKhalid Elshafie
 

Tendances (20)

Decision tree
Decision treeDecision tree
Decision tree
 
Decision tree
Decision treeDecision tree
Decision tree
 
Classification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsClassification Based Machine Learning Algorithms
Classification Based Machine Learning Algorithms
 
Classification and Regression
Classification and RegressionClassification and Regression
Classification and Regression
 
Slide3.ppt
Slide3.pptSlide3.ppt
Slide3.ppt
 
Decision tree
Decision treeDecision tree
Decision tree
 
Decision tree
Decision treeDecision tree
Decision tree
 
Classification in data mining
Classification in data mining Classification in data mining
Classification in data mining
 
Decision trees in Machine Learning
Decision trees in Machine Learning Decision trees in Machine Learning
Decision trees in Machine Learning
 
Decision tree induction \ Decision Tree Algorithm with Example| Data science
Decision tree induction \ Decision Tree Algorithm with Example| Data scienceDecision tree induction \ Decision Tree Algorithm with Example| Data science
Decision tree induction \ Decision Tree Algorithm with Example| Data science
 
Decision Trees
Decision TreesDecision Trees
Decision Trees
 
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...
 
2.2 decision tree
2.2 decision tree2.2 decision tree
2.2 decision tree
 
Understanding Bagging and Boosting
Understanding Bagging and BoostingUnderstanding Bagging and Boosting
Understanding Bagging and Boosting
 
Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests
 
Decision tree lecture 3
Decision tree lecture 3Decision tree lecture 3
Decision tree lecture 3
 
05 Clustering in Data Mining
05 Clustering in Data Mining05 Clustering in Data Mining
05 Clustering in Data Mining
 
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 ...
 
Data mining technique (decision tree)
Data mining technique (decision tree)Data mining technique (decision tree)
Data mining technique (decision tree)
 
Chapter 4 Classification
Chapter 4 ClassificationChapter 4 Classification
Chapter 4 Classification
 

En vedette

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
 

En vedette (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
 

Similaire à Decision Trees

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.
 

Similaire à Decision Trees (20)

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
 
Quantitative data essentials for charities - Learning Lab
Quantitative data essentials for charities - Learning LabQuantitative data essentials for charities - Learning Lab
Quantitative data essentials for charities - Learning Lab
 

Plus de 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
 

Plus de 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
 

Dernier

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
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
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
 
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
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Delhi Call girls
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
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
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 
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
 
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
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightDelhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service Onlineanilsa9823
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 

Dernier (20)

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
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
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
 
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
 
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
 
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...
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.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
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
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
 
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
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service Online
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 

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