SlideShare a Scribd company logo
Presented by:
Md. Al-Amin ID: 172015031
Belayet Hossain ID: 172015032
Presented to:
Ms. Shamima Akter
Designation: Assistant Professor
Decision Tree
Green University of Bangladesh
Department: CSE
Course Name: Artificial Intelligence Lab
Course Code: CSE 410
1
Outline
 Introduction
 What is decision tree?
 Decision tree terms
 Type of decision tree
 Decision tree algorithm
 Example using ID3
 Advantages of decision tree
 Limitation
 Conclusion
 Reference
2
Introduction
The main ideas behind Decision Trees were invented more than 70 years ago, and
nowadays they are among the most powerful Machine Learning tools.
A machine researcher named J.Ross Quinlan in 1980 developed a decision tree algorithm
known as ID3 (Iterative Dichotomiser 3). Later, he presented C4.5, which was the
successor of ID3. ID3 and C4.5 adopt a greedy approach. In this algorithm, there is no
backtracking; the trees are constructed in a top-down recursive divide-and-conquer
manner.
Examples Model
Generalize Instantiate for
another case
Prediction
3
What is DecisionTree?
Decision tree is a decision support tool that is the most powerful and popular tool which is
commonly used in operations research, classification, prediction and machine learning. A
Decision tree is a flowchart like tree structure, where each internal node denotes a test on
an attribute, each branch represents an outcome of the test, and each leaf node (terminal
node) holds a class label.
Example
4
DecisionTree Terms
5
Type of DecisionTree
Decision trees used in data mining are of two main types:
 Classification tree analysis is when the predicted outcome is the class (discrete) to
which the data belongs. Classification trees are used to predict membership of cases
or objects into classes of a categorical dependent variable from their measurements
on one or more predictor variables.
 Regression tree analysis is when the predicted outcome can be considered a real
number (e.g. the price of a house, or a patient's length of stay in a hospital).
6
DecisionTreeAlgorithm
 ID3(IterativeDichotomiser3):Quinlan, 1986
 C4.5(successorofID3):Quinlan 1993, based on ID3.
CART(ClassificationAndRegressionTree): Breiman, Friedman, Olsen and Stone, 1984.
 CHAID(Chi-squareautomaticinteractiondetection):Gordon V. Kass, 1980.
 Use information gain as splitting criterion
 Uses Gini diversity index as measure of impurity when deciding splitting
 A statistical approach that uses the Chi-squared test when deciding on the best split
7
ID3 (Iterative Dichotomiser3)
 Dichotomiser means dividing into two completely opposite things.
Algorithm iteratively divides attributes into two groups which one the most
dominant attribute and these to construct a tree.
Then it calculates the “Entropy & Information Gains” of each attribute. In
this way, the most dominant attribute can founded.
After then, the most dominant one is put on the tree of decision node.
Entropy & Gain scores would be calculated again among the other attribute.
Procedure continue until reaching a decision for that branch.
Cont…8
 Calculate the Entropy of every attribute using the data set S.
 Entropy 𝑆 = 𝛴 − 𝑃 𝑖 . 𝑙𝑜𝑔2
𝑝
𝑖
 Split the set S into subsets using the attribute for which the resulting entropy is minimum.
 Gain (S,A) = Entropy(S) − 𝛴[P(S|A).Entropy(S|A)]
 Make a decision tree node contain that attribute.
 Recurs on subsets sing remaining attribute.
ID3 (Iterative Dichotomiser 3)
Cont…9
To Go Outing or Not
Day Outlook Temperature Humidity Wind Decision
1 Sunny Hot High Weak No
2 Sunny Hot High Strong No
3 Overcast Hot High Weak Yes
4 Rain Mild High Weak Yes
5 Rain Cool Normal Weak Yes
6 Rain Cool Normal Strong No
7 Overcast Cool Normal Strong Yes
8 Sunny Mild High Weak No
9 Sunny Cool Normal Weak Yes
10 Rain Mild Normal Weak Yes
11 Sunny Mild Normal Strong Yes
12 Overcast Mild High Strong Yes
13 Overcast Hot Normal Weak Yes
14 Rain Mild High Strong No
Example
Cont…10
Accomplishment Using ID3
 Decision column consists of 14 instances and includes two labels- Yes & No
 There are 9 decisions labelled Yes & 5 decision labelled No
Entropy 𝐷𝑒𝑐𝑖𝑠𝑖𝑜𝑛 = −𝑃 𝑌𝑒𝑠 ∗ 𝑙𝑜𝑔2
𝑝
𝑌𝑒𝑠 − 𝑃 𝑁𝑜 ∗ 𝑙𝑜𝑔2
𝑝
𝑁𝑜
Entropy 𝐷𝑒𝑐𝑖𝑠𝑖𝑜𝑛 = −
9
14
∗ 𝑙𝑜𝑔2
9
14
−
5
14
∗ 𝑙𝑜𝑔2
5
14
= 0.940
Cont…11
Calculate Wind factor on decision
 Gain 𝐷, 𝑊 = 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝐷 − 𝛴 𝑃 𝐷|𝑊 ∗ 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑃 𝐷|𝑊
 Wind attribute has two labels- Weak & Strong
 Gain 𝐷, 𝑊 = 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝐷 −
𝑃 𝐷|𝑊 = 𝑤𝑒𝑒𝑘 ∗ 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑃 𝐷|𝑊 = 𝑤𝑒𝑎𝑘 −
𝑃 𝐷|𝑊 = 𝑠𝑡𝑟𝑜𝑛𝑔 ∗ 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑃 𝐷|𝑊 = 𝑠𝑡𝑟𝑜𝑛𝑔
Now we calculate Gain for Weak & Strong Wind
Cont…
Accomplishment Using ID3
12
Weak Wind factor on decision
Entropy 𝐷|𝑊 = 𝑤𝑒𝑒𝑎𝑘 = −𝑃 𝑁𝑜 ∗ 𝑙𝑜𝑔2
𝑝
𝑁𝑜 − 𝑃 𝑌𝑒𝑠 ∗ 𝑙𝑜𝑔2
𝑝
𝑌𝑒𝑠
= −
2
8
∗ 𝑙𝑜𝑔2
2
8
−
6
8
∗ 𝑙𝑜𝑔2
6
8
= 0.811
Strong Wind factor on decision
Entropy 𝐷|𝑊 = 𝑠𝑡𝑟𝑜𝑛𝑔 = −𝑃 𝑁𝑜 ∗ 𝑙𝑜𝑔2
𝑝
𝑁𝑜 − 𝑃 𝑌𝑒𝑠 ∗ 𝑙𝑜𝑔2
𝑝
𝑌𝑒𝑠
= −
3
6
∗ 𝑙𝑜𝑔2
3
6
−
3
6
∗ 𝑙𝑜𝑔2
3
6
= 1
Cont…
Accomplishment Using ID3
13
Wind factor on decision
Gain 𝐷, 𝑊 = 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝐷 −
𝑃 𝐷|𝑊 = 𝑤𝑒𝑒𝑘 ∗ 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑃 𝐷|𝑊 = 𝑤𝑒𝑎𝑘 −
𝑃 𝐷|𝑊 = 𝑠𝑡𝑟𝑜𝑛𝑔 ∗ 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑃 𝐷|𝑊 = 𝑠𝑡𝑟𝑜𝑛𝑔
= 0.940 −
8
14
∗ 0.811 −
6
14
∗ 1
= 0.048
Cont…
Accomplishment Using ID3
14
Applied similar calculation on the other columns 
 Gain (Decision, Outlook) = 0.246
 Gain (Decision, Temperature) = 0.029
 Gain (Decision, Humidity) = 0.151
 Gain (Decision, Wind) = 0.048
Outlook factor on decision produces highest score. That’s
why outlook decision will appear the root node of the tree.
Outlook
Sunny Overcast Rain
Cont…
Accomplishment Using ID3
15
Day Outlook Temperature Humidity Wind Decision
3 Overcast Hot High Weak Yes
7 Overcast Cool Normal Strong Yes
12 Overcast Mild High Strong Yes
13 Overcast Hot Normal Weak Yes
Outlook
Sunny Overcast Rain
Yes
[3,7,12,13]
Decision will always be yes if outlook were overcast
Cont…
Accomplishment Using ID3
16
Cont…
Accomplishment Using ID3
Sunny outlook on decision
Gain (Outlook = Sunny|Temp) = 0.270
Gain (Outlook = Sunny|Humidity) = 0.970
Gain (Outlook = Sunny|Wind) = 0.019
So Humidity is decision
17
To Go Outing or Not
Day Outlook Temperature Humidity Wind Decision
1 Sunny Hot High Weak No
2 Sunny Hot High Strong No
8 Sunny Mild High Weak No
9 Sunny Cool Normal Weak Yes
11 Sunny Mild Normal Strong Yes
Day Outlook Temperature Humidity Wind Decision
1 Sunny Hot High Weak No
2 Sunny Hot High Strong No
8 Sunny Mild High Weak No
Day Outlook Temperature Humidity Wind Decision
9 Sunny Cool Normal Weak Yes
11 Sunny Mild Normal Strong Yes
Sunny
High
Humidity
Normal
No
[1,2,8]
Yes
[9,11]
Cont…
Accomplishment Using ID3
18
Strong
Wind
Weak
No
[6,14]
Yes
[4,5,10]
Day Outlook Temperature Humidity Wind Decision
4 Rain Mild High Weak Yes
5 Rain Cool Normal Weak Yes
6 Rain Cool Normal Strong No
10 Rain Mild Normal Weak Yes
14 Rain Mild High Strong No
Wind produces the highest score if outlook were rain
Cont…
Accomplishment Using ID3
Rain outlook on decision
(Outlook = Rain|Temp)
(Outlook = Rain|Humidity)
(Outlook = Rain|Wind)
19
Humidity
Outlook
Sunny Overcast Rain
Normal
No
[1,2,8]
High Weak
Wind
Strong
Yes
[4,5,10]
No
[6,14]
Yes
[9,11]
Yes
[3,7,12,13]
Accomplishment Using ID3
20
Advantages of DecisionTree
 Simple to understand and interpret
 Able to handle both numerical and categorical data
 Requires little data preparation
 Uses a white box model
 Possible to validate a model using statistical tests
 Performs well with large datasets
 Mirrors human decision making more closely than other approaches
Decision trees have various advantages. They are 
21
Limitation of tree elements
 Trees can be very non-robust; therefore they will be unstable.
 Over fitting
 Not fit for continuous variables
 Greedy algorithms cannot guarantee to return the globally optimal decision tree.
 Decision tree learners create biased trees if some classes dominate.
 Generally, it gives low prediction accuracy for a dataset.
 Calculations can become complex when there are many class label.
 They are often relatively inaccurate.
22
Conclusion
23
Decision Tree algorithm belongs to the family of supervised learning algorithms. The
general motive of using Decision Tree is to create a training model which can use to
predict class or value of target variables by learning decision rules inferred from prior
data (training data). The primary challenge in the decision tree implementation is to
identify which attributes do we need to consider as the root node and each level.
Decision trees often mimic the human level thinking so it’s simple to understand the
data and make some good interpretations.
1) https://dzone.com/articles/machine-learning-with-decision-trees
2) https://www.tutorialspoint.com/data_mining/dm_dti.htm
3) https://en.wikipedia.org/wiki/Decision_tree_learning#Decision_tree_types
4) https://en.wikipedia.org/wiki/Decision_tree_learning#Advantages
5) https://en.wikipedia.org/wiki/Decision_tree_learning#Limitations
6) https://becominghuman.ai/understanding-decision-trees-43032111380f
7) https://en.wikipedia.org/wiki/Decision_tree_learning
8) https://www.youtube.com/watch?v=Svo4MTtkHXo&t=104s
9) https://www.youtube.com/watch?v=UzpwBb3qAbs&t=153s
Reference
24
Ad

More Related Content

What's hot (20)

Decision trees in Machine Learning
Decision trees in Machine Learning Decision trees in Machine Learning
Decision trees in Machine Learning
Mohammad Junaid Khan
 
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
 
Decision Tree Learning
Decision Tree LearningDecision Tree Learning
Decision Tree Learning
Milind Gokhale
 
Random forest
Random forestRandom forest
Random forest
Musa Hawamdah
 
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
Marina Santini
 
Classification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsClassification Based Machine Learning Algorithms
Classification Based Machine Learning Algorithms
Md. Main Uddin Rony
 
Decision Tree Learning
Decision Tree LearningDecision Tree Learning
Decision Tree Learning
Md. Ariful Hoque
 
2.2 decision tree
2.2 decision tree2.2 decision tree
2.2 decision tree
Krish_ver2
 
Decision tree
Decision treeDecision tree
Decision tree
shivani saluja
 
Decision Trees
Decision TreesDecision Trees
Decision Trees
Student
 
Types of Machine Learning
Types of Machine LearningTypes of Machine Learning
Types of Machine Learning
Samra Shahzadi
 
Naive Bayes
Naive BayesNaive Bayes
Naive Bayes
Abdullah al Mamun
 
Machine learning Lecture 2
Machine learning Lecture 2Machine learning Lecture 2
Machine learning Lecture 2
Srinivasan R
 
Semantic nets in artificial intelligence
Semantic nets in artificial intelligenceSemantic nets in artificial intelligence
Semantic nets in artificial intelligence
harshita virwani
 
Grid based method & model based clustering method
Grid based method & model based clustering methodGrid based method & model based clustering method
Grid based method & model based clustering method
rajshreemuthiah
 
Decision Tree - C4.5&CART
Decision Tree - C4.5&CARTDecision Tree - C4.5&CART
Decision Tree - C4.5&CART
Xueping Peng
 
Forms of learning in ai
Forms of learning in aiForms of learning in ai
Forms of learning in ai
Robert Antony
 
Decision trees
Decision treesDecision trees
Decision trees
Jagjit Wilku
 
Random Forest Classifier in Machine Learning | Palin Analytics
Random Forest Classifier in Machine Learning | Palin AnalyticsRandom Forest Classifier in Machine Learning | Palin Analytics
Random Forest Classifier in Machine Learning | Palin Analytics
Palin analytics
 
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 trees in Machine Learning
Decision trees in Machine Learning Decision trees in Machine Learning
Decision trees in Machine Learning
Mohammad Junaid Khan
 
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
 
Decision Tree Learning
Decision Tree LearningDecision Tree Learning
Decision Tree Learning
Milind Gokhale
 
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
Marina Santini
 
Classification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsClassification Based Machine Learning Algorithms
Classification Based Machine Learning Algorithms
Md. Main Uddin Rony
 
2.2 decision tree
2.2 decision tree2.2 decision tree
2.2 decision tree
Krish_ver2
 
Decision Trees
Decision TreesDecision Trees
Decision Trees
Student
 
Types of Machine Learning
Types of Machine LearningTypes of Machine Learning
Types of Machine Learning
Samra Shahzadi
 
Machine learning Lecture 2
Machine learning Lecture 2Machine learning Lecture 2
Machine learning Lecture 2
Srinivasan R
 
Semantic nets in artificial intelligence
Semantic nets in artificial intelligenceSemantic nets in artificial intelligence
Semantic nets in artificial intelligence
harshita virwani
 
Grid based method & model based clustering method
Grid based method & model based clustering methodGrid based method & model based clustering method
Grid based method & model based clustering method
rajshreemuthiah
 
Decision Tree - C4.5&CART
Decision Tree - C4.5&CARTDecision Tree - C4.5&CART
Decision Tree - C4.5&CART
Xueping Peng
 
Forms of learning in ai
Forms of learning in aiForms of learning in ai
Forms of learning in ai
Robert Antony
 
Random Forest Classifier in Machine Learning | Palin Analytics
Random Forest Classifier in Machine Learning | Palin AnalyticsRandom Forest Classifier in Machine Learning | Palin Analytics
Random Forest Classifier in Machine Learning | Palin Analytics
Palin analytics
 
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
 

Similar to Decision tree in artificial intelligence (20)

"Induction of Decision Trees" @ Papers We Love Bucharest
"Induction of Decision Trees" @ Papers We Love Bucharest"Induction of Decision Trees" @ Papers We Love Bucharest
"Induction of Decision Trees" @ Papers We Love Bucharest
Stefan Adam
 
Decision trees
Decision treesDecision trees
Decision trees
nandini patil
 
decision tree DECISION TREE IN MACHINE .pptx
decision tree DECISION TREE IN MACHINE .pptxdecision tree DECISION TREE IN MACHINE .pptx
decision tree DECISION TREE IN MACHINE .pptx
angelinjeba6
 
Decision tree algorithm in Machine Learning
Decision tree algorithm in Machine LearningDecision tree algorithm in Machine Learning
Decision tree algorithm in Machine Learning
girilogu2
 
3. Tree Models in machine learning
3.  Tree   Models  in  machine  learning3.  Tree   Models  in  machine  learning
3. Tree Models in machine learning
Kv Sagar
 
Decision tree Using Machine Learning.ppt
Decision tree Using Machine Learning.pptDecision tree Using Machine Learning.ppt
Decision tree Using Machine Learning.ppt
srinuvasrao101
 
Software-Praktikum SoSe 2005 Lehrstuhl fuer Maschinelles ...
Software-Praktikum SoSe 2005 Lehrstuhl fuer Maschinelles ...Software-Praktikum SoSe 2005 Lehrstuhl fuer Maschinelles ...
Software-Praktikum SoSe 2005 Lehrstuhl fuer Maschinelles ...
butest
 
3.Classification.ppt
3.Classification.ppt3.Classification.ppt
3.Classification.ppt
KhalilDaiyob1
 
Decision trees
Decision treesDecision trees
Decision trees
Rohit Srivastava
 
BAS 250 Lecture 5
BAS 250 Lecture 5BAS 250 Lecture 5
BAS 250 Lecture 5
Wake Tech BAS
 
Decision Trees
Decision TreesDecision Trees
Decision Trees
zekeLabs Technologies
 
Decision trees
Decision treesDecision trees
Decision trees
SatishH5
 
unit 5 decision tree2.pptx
unit 5 decision tree2.pptxunit 5 decision tree2.pptx
unit 5 decision tree2.pptx
ssuser5c580e1
 
Decision Tree
Decision TreeDecision Tree
Decision Tree
Learnbay Datascience
 
Data Mining in Market Research
Data Mining in Market ResearchData Mining in Market Research
Data Mining in Market Research
butest
 
Data Mining In Market Research
Data Mining In Market ResearchData Mining In Market Research
Data Mining In Market Research
kevinlan
 
Data Mining In Market Research
Data Mining In Market ResearchData Mining In Market Research
Data Mining In Market Research
jim
 
Decision treeDecision treeDecision treeDecision tree
Decision treeDecision treeDecision treeDecision treeDecision treeDecision treeDecision treeDecision tree
Decision treeDecision treeDecision treeDecision tree
SsdSsd5
 
Descision making descision making decision tree.pptx
Descision making descision making decision tree.pptxDescision making descision making decision tree.pptx
Descision making descision making decision tree.pptx
charmeshponnagani
 
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!
 
"Induction of Decision Trees" @ Papers We Love Bucharest
"Induction of Decision Trees" @ Papers We Love Bucharest"Induction of Decision Trees" @ Papers We Love Bucharest
"Induction of Decision Trees" @ Papers We Love Bucharest
Stefan Adam
 
decision tree DECISION TREE IN MACHINE .pptx
decision tree DECISION TREE IN MACHINE .pptxdecision tree DECISION TREE IN MACHINE .pptx
decision tree DECISION TREE IN MACHINE .pptx
angelinjeba6
 
Decision tree algorithm in Machine Learning
Decision tree algorithm in Machine LearningDecision tree algorithm in Machine Learning
Decision tree algorithm in Machine Learning
girilogu2
 
3. Tree Models in machine learning
3.  Tree   Models  in  machine  learning3.  Tree   Models  in  machine  learning
3. Tree Models in machine learning
Kv Sagar
 
Decision tree Using Machine Learning.ppt
Decision tree Using Machine Learning.pptDecision tree Using Machine Learning.ppt
Decision tree Using Machine Learning.ppt
srinuvasrao101
 
Software-Praktikum SoSe 2005 Lehrstuhl fuer Maschinelles ...
Software-Praktikum SoSe 2005 Lehrstuhl fuer Maschinelles ...Software-Praktikum SoSe 2005 Lehrstuhl fuer Maschinelles ...
Software-Praktikum SoSe 2005 Lehrstuhl fuer Maschinelles ...
butest
 
3.Classification.ppt
3.Classification.ppt3.Classification.ppt
3.Classification.ppt
KhalilDaiyob1
 
Decision trees
Decision treesDecision trees
Decision trees
SatishH5
 
unit 5 decision tree2.pptx
unit 5 decision tree2.pptxunit 5 decision tree2.pptx
unit 5 decision tree2.pptx
ssuser5c580e1
 
Data Mining in Market Research
Data Mining in Market ResearchData Mining in Market Research
Data Mining in Market Research
butest
 
Data Mining In Market Research
Data Mining In Market ResearchData Mining In Market Research
Data Mining In Market Research
kevinlan
 
Data Mining In Market Research
Data Mining In Market ResearchData Mining In Market Research
Data Mining In Market Research
jim
 
Decision treeDecision treeDecision treeDecision tree
Decision treeDecision treeDecision treeDecision treeDecision treeDecision treeDecision treeDecision tree
Decision treeDecision treeDecision treeDecision tree
SsdSsd5
 
Descision making descision making decision tree.pptx
Descision making descision making decision tree.pptxDescision making descision making decision tree.pptx
Descision making descision making decision tree.pptx
charmeshponnagani
 
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!
 
Ad

More from MdAlAmin187 (20)

2D viewing & clipping
2D viewing & clipping2D viewing & clipping
2D viewing & clipping
MdAlAmin187
 
Assignment on field study of Mahera & Pakutia Jomidar Bari
Assignment on field study of Mahera & Pakutia Jomidar BariAssignment on field study of Mahera & Pakutia Jomidar Bari
Assignment on field study of Mahera & Pakutia Jomidar Bari
MdAlAmin187
 
Social problems in Bangladesh
Social problems in BangladeshSocial problems in Bangladesh
Social problems in Bangladesh
MdAlAmin187
 
History of Language & History of Bangla Language
History of Language & History of Bangla LanguageHistory of Language & History of Bangla Language
History of Language & History of Bangla Language
MdAlAmin187
 
Lu Decomposition
Lu DecompositionLu Decomposition
Lu Decomposition
MdAlAmin187
 
Non Linear Equation
Non Linear EquationNon Linear Equation
Non Linear Equation
MdAlAmin187
 
Smart home technology LaTeX paper
Smart home technology LaTeX paperSmart home technology LaTeX paper
Smart home technology LaTeX paper
MdAlAmin187
 
Emo 8086 code for Loop
Emo 8086 code for LoopEmo 8086 code for Loop
Emo 8086 code for Loop
MdAlAmin187
 
Emo 8086 code for add
Emo 8086 code for addEmo 8086 code for add
Emo 8086 code for add
MdAlAmin187
 
Emo 8086 code for Subtraction
Emo 8086 code for SubtractionEmo 8086 code for Subtraction
Emo 8086 code for Subtraction
MdAlAmin187
 
Virtual local area network(VLAN)
Virtual local area network(VLAN)Virtual local area network(VLAN)
Virtual local area network(VLAN)
MdAlAmin187
 
Telnet configuration
Telnet configurationTelnet configuration
Telnet configuration
MdAlAmin187
 
Standard & Extended ACL Configuration
Standard & Extended ACL ConfigurationStandard & Extended ACL Configuration
Standard & Extended ACL Configuration
MdAlAmin187
 
Chosse a best algorithm for page replacement to reduce page fault and analysi...
Chosse a best algorithm for page replacement to reduce page fault and analysi...Chosse a best algorithm for page replacement to reduce page fault and analysi...
Chosse a best algorithm for page replacement to reduce page fault and analysi...
MdAlAmin187
 
Topological Sort
Topological SortTopological Sort
Topological Sort
MdAlAmin187
 
Verification of Solenoidal & Irrotational
Verification of Solenoidal & IrrotationalVerification of Solenoidal & Irrotational
Verification of Solenoidal & Irrotational
MdAlAmin187
 
Bangla spell checker & suggestion generator
Bangla spell checker & suggestion generatorBangla spell checker & suggestion generator
Bangla spell checker & suggestion generator
MdAlAmin187
 
Different types of DBMS
Different types of DBMSDifferent types of DBMS
Different types of DBMS
MdAlAmin187
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
MdAlAmin187
 
Math presentation
Math presentationMath presentation
Math presentation
MdAlAmin187
 
2D viewing & clipping
2D viewing & clipping2D viewing & clipping
2D viewing & clipping
MdAlAmin187
 
Assignment on field study of Mahera & Pakutia Jomidar Bari
Assignment on field study of Mahera & Pakutia Jomidar BariAssignment on field study of Mahera & Pakutia Jomidar Bari
Assignment on field study of Mahera & Pakutia Jomidar Bari
MdAlAmin187
 
Social problems in Bangladesh
Social problems in BangladeshSocial problems in Bangladesh
Social problems in Bangladesh
MdAlAmin187
 
History of Language & History of Bangla Language
History of Language & History of Bangla LanguageHistory of Language & History of Bangla Language
History of Language & History of Bangla Language
MdAlAmin187
 
Lu Decomposition
Lu DecompositionLu Decomposition
Lu Decomposition
MdAlAmin187
 
Non Linear Equation
Non Linear EquationNon Linear Equation
Non Linear Equation
MdAlAmin187
 
Smart home technology LaTeX paper
Smart home technology LaTeX paperSmart home technology LaTeX paper
Smart home technology LaTeX paper
MdAlAmin187
 
Emo 8086 code for Loop
Emo 8086 code for LoopEmo 8086 code for Loop
Emo 8086 code for Loop
MdAlAmin187
 
Emo 8086 code for add
Emo 8086 code for addEmo 8086 code for add
Emo 8086 code for add
MdAlAmin187
 
Emo 8086 code for Subtraction
Emo 8086 code for SubtractionEmo 8086 code for Subtraction
Emo 8086 code for Subtraction
MdAlAmin187
 
Virtual local area network(VLAN)
Virtual local area network(VLAN)Virtual local area network(VLAN)
Virtual local area network(VLAN)
MdAlAmin187
 
Telnet configuration
Telnet configurationTelnet configuration
Telnet configuration
MdAlAmin187
 
Standard & Extended ACL Configuration
Standard & Extended ACL ConfigurationStandard & Extended ACL Configuration
Standard & Extended ACL Configuration
MdAlAmin187
 
Chosse a best algorithm for page replacement to reduce page fault and analysi...
Chosse a best algorithm for page replacement to reduce page fault and analysi...Chosse a best algorithm for page replacement to reduce page fault and analysi...
Chosse a best algorithm for page replacement to reduce page fault and analysi...
MdAlAmin187
 
Topological Sort
Topological SortTopological Sort
Topological Sort
MdAlAmin187
 
Verification of Solenoidal & Irrotational
Verification of Solenoidal & IrrotationalVerification of Solenoidal & Irrotational
Verification of Solenoidal & Irrotational
MdAlAmin187
 
Bangla spell checker & suggestion generator
Bangla spell checker & suggestion generatorBangla spell checker & suggestion generator
Bangla spell checker & suggestion generator
MdAlAmin187
 
Different types of DBMS
Different types of DBMSDifferent types of DBMS
Different types of DBMS
MdAlAmin187
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
MdAlAmin187
 
Math presentation
Math presentationMath presentation
Math presentation
MdAlAmin187
 
Ad

Recently uploaded (20)

Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.
MCH
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx   quiz by Ridip HazarikaTHE STG QUIZ GROUP D.pptx   quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
Ridip Hazarika
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Engage Donors Through Powerful Storytelling.pdf
Engage Donors Through Powerful Storytelling.pdfEngage Donors Through Powerful Storytelling.pdf
Engage Donors Through Powerful Storytelling.pdf
TechSoup
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
Link your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRMLink your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRM
Celine George
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Grade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable WorksheetGrade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable Worksheet
Sritoma Majumder
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.
MCH
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx   quiz by Ridip HazarikaTHE STG QUIZ GROUP D.pptx   quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
Ridip Hazarika
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Engage Donors Through Powerful Storytelling.pdf
Engage Donors Through Powerful Storytelling.pdfEngage Donors Through Powerful Storytelling.pdf
Engage Donors Through Powerful Storytelling.pdf
TechSoup
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
Link your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRMLink your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRM
Celine George
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Grade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable WorksheetGrade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable Worksheet
Sritoma Majumder
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 

Decision tree in artificial intelligence

  • 1. Presented by: Md. Al-Amin ID: 172015031 Belayet Hossain ID: 172015032 Presented to: Ms. Shamima Akter Designation: Assistant Professor Decision Tree Green University of Bangladesh Department: CSE Course Name: Artificial Intelligence Lab Course Code: CSE 410 1
  • 2. Outline  Introduction  What is decision tree?  Decision tree terms  Type of decision tree  Decision tree algorithm  Example using ID3  Advantages of decision tree  Limitation  Conclusion  Reference 2
  • 3. Introduction The main ideas behind Decision Trees were invented more than 70 years ago, and nowadays they are among the most powerful Machine Learning tools. A machine researcher named J.Ross Quinlan in 1980 developed a decision tree algorithm known as ID3 (Iterative Dichotomiser 3). Later, he presented C4.5, which was the successor of ID3. ID3 and C4.5 adopt a greedy approach. In this algorithm, there is no backtracking; the trees are constructed in a top-down recursive divide-and-conquer manner. Examples Model Generalize Instantiate for another case Prediction 3
  • 4. What is DecisionTree? Decision tree is a decision support tool that is the most powerful and popular tool which is commonly used in operations research, classification, prediction and machine learning. A Decision tree is a flowchart like tree structure, where each internal node denotes a test on an attribute, each branch represents an outcome of the test, and each leaf node (terminal node) holds a class label. Example 4
  • 6. Type of DecisionTree Decision trees used in data mining are of two main types:  Classification tree analysis is when the predicted outcome is the class (discrete) to which the data belongs. Classification trees are used to predict membership of cases or objects into classes of a categorical dependent variable from their measurements on one or more predictor variables.  Regression tree analysis is when the predicted outcome can be considered a real number (e.g. the price of a house, or a patient's length of stay in a hospital). 6
  • 7. DecisionTreeAlgorithm  ID3(IterativeDichotomiser3):Quinlan, 1986  C4.5(successorofID3):Quinlan 1993, based on ID3. CART(ClassificationAndRegressionTree): Breiman, Friedman, Olsen and Stone, 1984.  CHAID(Chi-squareautomaticinteractiondetection):Gordon V. Kass, 1980.  Use information gain as splitting criterion  Uses Gini diversity index as measure of impurity when deciding splitting  A statistical approach that uses the Chi-squared test when deciding on the best split 7
  • 8. ID3 (Iterative Dichotomiser3)  Dichotomiser means dividing into two completely opposite things. Algorithm iteratively divides attributes into two groups which one the most dominant attribute and these to construct a tree. Then it calculates the “Entropy & Information Gains” of each attribute. In this way, the most dominant attribute can founded. After then, the most dominant one is put on the tree of decision node. Entropy & Gain scores would be calculated again among the other attribute. Procedure continue until reaching a decision for that branch. Cont…8
  • 9.  Calculate the Entropy of every attribute using the data set S.  Entropy 𝑆 = 𝛴 − 𝑃 𝑖 . 𝑙𝑜𝑔2 𝑝 𝑖  Split the set S into subsets using the attribute for which the resulting entropy is minimum.  Gain (S,A) = Entropy(S) − 𝛴[P(S|A).Entropy(S|A)]  Make a decision tree node contain that attribute.  Recurs on subsets sing remaining attribute. ID3 (Iterative Dichotomiser 3) Cont…9
  • 10. To Go Outing or Not Day Outlook Temperature Humidity Wind Decision 1 Sunny Hot High Weak No 2 Sunny Hot High Strong No 3 Overcast Hot High Weak Yes 4 Rain Mild High Weak Yes 5 Rain Cool Normal Weak Yes 6 Rain Cool Normal Strong No 7 Overcast Cool Normal Strong Yes 8 Sunny Mild High Weak No 9 Sunny Cool Normal Weak Yes 10 Rain Mild Normal Weak Yes 11 Sunny Mild Normal Strong Yes 12 Overcast Mild High Strong Yes 13 Overcast Hot Normal Weak Yes 14 Rain Mild High Strong No Example Cont…10
  • 11. Accomplishment Using ID3  Decision column consists of 14 instances and includes two labels- Yes & No  There are 9 decisions labelled Yes & 5 decision labelled No Entropy 𝐷𝑒𝑐𝑖𝑠𝑖𝑜𝑛 = −𝑃 𝑌𝑒𝑠 ∗ 𝑙𝑜𝑔2 𝑝 𝑌𝑒𝑠 − 𝑃 𝑁𝑜 ∗ 𝑙𝑜𝑔2 𝑝 𝑁𝑜 Entropy 𝐷𝑒𝑐𝑖𝑠𝑖𝑜𝑛 = − 9 14 ∗ 𝑙𝑜𝑔2 9 14 − 5 14 ∗ 𝑙𝑜𝑔2 5 14 = 0.940 Cont…11
  • 12. Calculate Wind factor on decision  Gain 𝐷, 𝑊 = 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝐷 − 𝛴 𝑃 𝐷|𝑊 ∗ 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑃 𝐷|𝑊  Wind attribute has two labels- Weak & Strong  Gain 𝐷, 𝑊 = 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝐷 − 𝑃 𝐷|𝑊 = 𝑤𝑒𝑒𝑘 ∗ 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑃 𝐷|𝑊 = 𝑤𝑒𝑎𝑘 − 𝑃 𝐷|𝑊 = 𝑠𝑡𝑟𝑜𝑛𝑔 ∗ 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑃 𝐷|𝑊 = 𝑠𝑡𝑟𝑜𝑛𝑔 Now we calculate Gain for Weak & Strong Wind Cont… Accomplishment Using ID3 12
  • 13. Weak Wind factor on decision Entropy 𝐷|𝑊 = 𝑤𝑒𝑒𝑎𝑘 = −𝑃 𝑁𝑜 ∗ 𝑙𝑜𝑔2 𝑝 𝑁𝑜 − 𝑃 𝑌𝑒𝑠 ∗ 𝑙𝑜𝑔2 𝑝 𝑌𝑒𝑠 = − 2 8 ∗ 𝑙𝑜𝑔2 2 8 − 6 8 ∗ 𝑙𝑜𝑔2 6 8 = 0.811 Strong Wind factor on decision Entropy 𝐷|𝑊 = 𝑠𝑡𝑟𝑜𝑛𝑔 = −𝑃 𝑁𝑜 ∗ 𝑙𝑜𝑔2 𝑝 𝑁𝑜 − 𝑃 𝑌𝑒𝑠 ∗ 𝑙𝑜𝑔2 𝑝 𝑌𝑒𝑠 = − 3 6 ∗ 𝑙𝑜𝑔2 3 6 − 3 6 ∗ 𝑙𝑜𝑔2 3 6 = 1 Cont… Accomplishment Using ID3 13
  • 14. Wind factor on decision Gain 𝐷, 𝑊 = 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝐷 − 𝑃 𝐷|𝑊 = 𝑤𝑒𝑒𝑘 ∗ 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑃 𝐷|𝑊 = 𝑤𝑒𝑎𝑘 − 𝑃 𝐷|𝑊 = 𝑠𝑡𝑟𝑜𝑛𝑔 ∗ 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑃 𝐷|𝑊 = 𝑠𝑡𝑟𝑜𝑛𝑔 = 0.940 − 8 14 ∗ 0.811 − 6 14 ∗ 1 = 0.048 Cont… Accomplishment Using ID3 14
  • 15. Applied similar calculation on the other columns   Gain (Decision, Outlook) = 0.246  Gain (Decision, Temperature) = 0.029  Gain (Decision, Humidity) = 0.151  Gain (Decision, Wind) = 0.048 Outlook factor on decision produces highest score. That’s why outlook decision will appear the root node of the tree. Outlook Sunny Overcast Rain Cont… Accomplishment Using ID3 15
  • 16. Day Outlook Temperature Humidity Wind Decision 3 Overcast Hot High Weak Yes 7 Overcast Cool Normal Strong Yes 12 Overcast Mild High Strong Yes 13 Overcast Hot Normal Weak Yes Outlook Sunny Overcast Rain Yes [3,7,12,13] Decision will always be yes if outlook were overcast Cont… Accomplishment Using ID3 16
  • 17. Cont… Accomplishment Using ID3 Sunny outlook on decision Gain (Outlook = Sunny|Temp) = 0.270 Gain (Outlook = Sunny|Humidity) = 0.970 Gain (Outlook = Sunny|Wind) = 0.019 So Humidity is decision 17 To Go Outing or Not Day Outlook Temperature Humidity Wind Decision 1 Sunny Hot High Weak No 2 Sunny Hot High Strong No 8 Sunny Mild High Weak No 9 Sunny Cool Normal Weak Yes 11 Sunny Mild Normal Strong Yes
  • 18. Day Outlook Temperature Humidity Wind Decision 1 Sunny Hot High Weak No 2 Sunny Hot High Strong No 8 Sunny Mild High Weak No Day Outlook Temperature Humidity Wind Decision 9 Sunny Cool Normal Weak Yes 11 Sunny Mild Normal Strong Yes Sunny High Humidity Normal No [1,2,8] Yes [9,11] Cont… Accomplishment Using ID3 18
  • 19. Strong Wind Weak No [6,14] Yes [4,5,10] Day Outlook Temperature Humidity Wind Decision 4 Rain Mild High Weak Yes 5 Rain Cool Normal Weak Yes 6 Rain Cool Normal Strong No 10 Rain Mild Normal Weak Yes 14 Rain Mild High Strong No Wind produces the highest score if outlook were rain Cont… Accomplishment Using ID3 Rain outlook on decision (Outlook = Rain|Temp) (Outlook = Rain|Humidity) (Outlook = Rain|Wind) 19
  • 20. Humidity Outlook Sunny Overcast Rain Normal No [1,2,8] High Weak Wind Strong Yes [4,5,10] No [6,14] Yes [9,11] Yes [3,7,12,13] Accomplishment Using ID3 20
  • 21. Advantages of DecisionTree  Simple to understand and interpret  Able to handle both numerical and categorical data  Requires little data preparation  Uses a white box model  Possible to validate a model using statistical tests  Performs well with large datasets  Mirrors human decision making more closely than other approaches Decision trees have various advantages. They are  21
  • 22. Limitation of tree elements  Trees can be very non-robust; therefore they will be unstable.  Over fitting  Not fit for continuous variables  Greedy algorithms cannot guarantee to return the globally optimal decision tree.  Decision tree learners create biased trees if some classes dominate.  Generally, it gives low prediction accuracy for a dataset.  Calculations can become complex when there are many class label.  They are often relatively inaccurate. 22
  • 23. Conclusion 23 Decision Tree algorithm belongs to the family of supervised learning algorithms. The general motive of using Decision Tree is to create a training model which can use to predict class or value of target variables by learning decision rules inferred from prior data (training data). The primary challenge in the decision tree implementation is to identify which attributes do we need to consider as the root node and each level. Decision trees often mimic the human level thinking so it’s simple to understand the data and make some good interpretations.
  • 24. 1) https://dzone.com/articles/machine-learning-with-decision-trees 2) https://www.tutorialspoint.com/data_mining/dm_dti.htm 3) https://en.wikipedia.org/wiki/Decision_tree_learning#Decision_tree_types 4) https://en.wikipedia.org/wiki/Decision_tree_learning#Advantages 5) https://en.wikipedia.org/wiki/Decision_tree_learning#Limitations 6) https://becominghuman.ai/understanding-decision-trees-43032111380f 7) https://en.wikipedia.org/wiki/Decision_tree_learning 8) https://www.youtube.com/watch?v=Svo4MTtkHXo&t=104s 9) https://www.youtube.com/watch?v=UzpwBb3qAbs&t=153s Reference 24