SlideShare a Scribd company logo
1 of 25
Download to read offline
Step by step Decision Tree..
Step 1...
●
Provide Dataset
●
The given table informs
about decision making
factors to play tennis at
outside for previous 14 days.
Step 1...
●
We have four X values
(outlook,temp,humidity and
windy) being categorical and
one y value (play Y or N)
also being categorical.
●
So which atrribute do we
need to pick first??
●
We have to determine the attribute that best
classifies the training data; use this attribute at
the root of the tree. Repeat this process at for
each branch.
●
So, now we have to perform Attribute
Selection.
●
For attribute selection we have to find
– Entropy
– Information gain
Atrribute Selection...
●
Selection of an attribute to test at each node - choosing the
most useful attribute for classifying examples.
●
Information Gain
– Measures how well a given attribute separates the training
examples according to their target classification.
– This measure is used to select among the candidate
attributes at each step while growing the tree.
Step2...
●
Finding Entropy:-
– A measure of homogeneity of the set of examples.
– Given a set S of positive and negative examples of some tar
get concept (a 2-class problem), the entropy of set S relative
to this binary classification is
E(S) = - p(P)log2 p(P) – p(N)log2 p(N)
Step2...
●
Example:-
●
Suppose S has 25 examples, 15 positive and 10 negatives
[15+, 10-]. Then the entropy of S relative to this classificatio
n is
– E(S) = - p(P)log2 p(P) – p(N)log2 p(N)
– E(S)=-(15/25) log2(15/25) - (10/25) log2 (10/25)
Step 3...
●
Finding Information Gain:-
– Information gain measures the expected reduction in entrop
y, or uncertainty.
– Values(A) is the set of all possible values for attribute A, and Sv th
e subset of S for which attribute A has value v Sv = {s in S | A(s) =
v}.
– the first term in the equation for Gain is just the entropy of the origi
nal collection S
– the second term is the expected value of the entropy after S is par
titioned using attribute A
( )
( , ) ( ) ( )v
v
v Values A
S
Gain S A Entropy S Entropy S
S
  
Calculating Informaiton gain
●
let’s take dataset as
Calculating Informaiton gain
●
Entropy(Decision) = – p(Yes) . log2p(Yes) –
p(No) . log2p(No)
●
Entropy(Decision) = – (9/14) . log2(9/14) –
(5/14) . log2(5/14) = 0.940
●
We need to find the most
dominant factor for
decisioning.
Calculating Informaiton gain
●
Gain(Decision, Wind) = Entropy(Decision) – ∑
[ p(Decision|Wind) . Entropy(Decision|Wind) ]
●
Gain(Decision, Wind) = Entropy(Decision) –
[ p(Decision|Wind=Weak) * Entropy(Decision|
Wind=Weak) ] – [ p(Decision|Wind=Strong) *
Entropy(Decision|Wind=Strong) ]
Calculating Informaiton gain
●
Entropy(Decision|Wind=Weak) = – (2/8) .
log2(2/8) – (6/8) . log2(6/8) = 0.811
●
Entropy(Decision|Wind=Strong) = – (3/6) .
log2(3/6) – (3/6) . log2(3/6) = 1
Now putting all value together:-
– Gain(Decision, Wind) =0.940 – [ (8/14) . 0.811 ] – [
(6/14). 1] = 0.048
Calculating Informaiton gain
●
By applying similar calculation:-
●
Gain(Decision, Outlook) = 0.246
●
Gain(Decision, Temperature) = 0.029
●
Gain(Decision, Humidity) = 0.151
●
As seen, outlook factor on decision produces
the highest score. That’s why, outlook decision
will appear in the root node of the tree.
Overcast outlook on decision..
Day Outlook Temp 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
Overcast outlook on decision..
●
Basically, decision will always be yes if outlook
were overcast.
●
Here we don’t need for the further classification.
Sunny outlook on decision..
Day Outlook Temp 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
Sunny outlook on decision...
●
Now we have 5 instances so, we will be
repeating above step and again find the
information gain.
●
1- Gain(Outlook=Sunny|Temperature) = 0.570
●
2- Gain(Outlook=Sunny|Humidity) = 0.970
●
3- Gain(Outlook=Sunny|Wind) = 0.019
At this point humidity is the decesion because it
produces highest score if outlook were sunny.
Sunny outlook on decision...
Day Outlook Temp. Humidity Wind Decision
1 Sunny Hot High Weak No
2 Sunny Hot High Strong No
8 Sunny Mild High Weak No
Day Outlook Temp. Humidity Wind Decision
9 Sunny Cool Normal Weak Yes
11 Sunny Mild Normal Strong Yes
Decision will always be no if humidity were high.
Decision will always be yes if humidity were normal.
Rain Outlook On Decision...
Day Outlook Temp. 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
Rain Outlook On Decision...
●
Again we will be finding Information Gain from
the above 5 instances.
●
1- Gain(Outlook=Rain | Temperature)
●
2- Gain(Outlook=Rain | Humidity)
●
3- Gain(Outlook=Rain | Wind)
●
Wind produces the highest score if outlook
were rain.
Rain Outlook On Decision...
Day Outlook Temp. Humidity Wind Decision
4 Rain Mild High Weak Yes
5 Rain Cool Normal Weak Yes
10 Rain Mild Normal Weak Yes
Decision will always be yes if wind were weak and outlook were rain.
Day Outlook Temp. Humidity Wind Decision
6 Rain Cool Normal Strong No
14 Rain Mild High Strong No
Decision will be always no if wind were strong and outlook were rain.
●
Repeatedly applying the above step we will get
the required Decision Tree.
Decision Tree Steps

More Related Content

Similar to Decision Tree Steps

Machine Learning 2D5362
Machine Learning 2D5362Machine Learning 2D5362
Machine Learning 2D5362
butest
 
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...
Simplilearn
 

Similar to Decision Tree Steps (19)

ID3 -rks.pdf
ID3 -rks.pdfID3 -rks.pdf
ID3 -rks.pdf
 
CART Algorithm.pptx
CART Algorithm.pptxCART Algorithm.pptx
CART Algorithm.pptx
 
Machine Learning 2D5362
Machine Learning 2D5362Machine Learning 2D5362
Machine Learning 2D5362
 
Decision trees
Decision treesDecision trees
Decision trees
 
Id3,c4.5 algorithim
Id3,c4.5 algorithimId3,c4.5 algorithim
Id3,c4.5 algorithim
 
Ai & Ml presentation purushottam.pptx
Ai & Ml presentation purushottam.pptxAi & Ml presentation purushottam.pptx
Ai & Ml presentation purushottam.pptx
 
Decision Trees
Decision TreesDecision Trees
Decision Trees
 
Decision tree in artificial intelligence
Decision tree in artificial intelligenceDecision tree in artificial intelligence
Decision tree in artificial intelligence
 
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...
 
Data Science Training in Bangalore | Learnbay.in | Decision Tree | Machine Le...
Data Science Training in Bangalore | Learnbay.in | Decision Tree | Machine Le...Data Science Training in Bangalore | Learnbay.in | Decision Tree | Machine Le...
Data Science Training in Bangalore | Learnbay.in | Decision Tree | Machine Le...
 
WEKA:Algorithms The Basic Methods
WEKA:Algorithms The Basic MethodsWEKA:Algorithms The Basic Methods
WEKA:Algorithms The Basic Methods
 
WEKA: Algorithms The Basic Methods
WEKA: Algorithms The Basic MethodsWEKA: Algorithms The Basic Methods
WEKA: Algorithms The Basic Methods
 
Decision Tree
Decision TreeDecision Tree
Decision Tree
 
Deep einforcement learning
Deep einforcement learningDeep einforcement learning
Deep einforcement learning
 
ID3 Algorithm & ROC Analysis
ID3 Algorithm & ROC AnalysisID3 Algorithm & ROC Analysis
ID3 Algorithm & ROC Analysis
 
Ensemble methods in machine learning
Ensemble methods in machine learningEnsemble methods in machine learning
Ensemble methods in machine learning
 
Deep RL.pdf
Deep RL.pdfDeep RL.pdf
Deep RL.pdf
 
Id3 algorithm
Id3 algorithmId3 algorithm
Id3 algorithm
 
Finalver
FinalverFinalver
Finalver
 

Recently uploaded

怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制
怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制
怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制
vexqp
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Bertram Ludäscher
 
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
vexqp
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
nirzagarg
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
Jual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
Jual Cytotec Asli Obat Aborsi No. 1 Paling ManjurJual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
Jual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
ptikerjasaptiker
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
gajnagarg
 
PLE-statistics document for primary schs
PLE-statistics document for primary schsPLE-statistics document for primary schs
PLE-statistics document for primary schs
cnajjemba
 
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
q6pzkpark
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
nirzagarg
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
vexqp
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
nirzagarg
 

Recently uploaded (20)

5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制
怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制
怎样办理伦敦大学城市学院毕业证(CITY毕业证书)成绩单学校原版复制
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
 
Jual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
Jual Cytotec Asli Obat Aborsi No. 1 Paling ManjurJual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
Jual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
 
PLE-statistics document for primary schs
PLE-statistics document for primary schsPLE-statistics document for primary schs
PLE-statistics document for primary schs
 
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptxThe-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
 
Data Analyst Tasks to do the internship.pdf
Data Analyst Tasks to do the internship.pdfData Analyst Tasks to do the internship.pdf
Data Analyst Tasks to do the internship.pdf
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 

Decision Tree Steps

  • 1. Step by step Decision Tree..
  • 2. Step 1... ● Provide Dataset ● The given table informs about decision making factors to play tennis at outside for previous 14 days.
  • 3. Step 1... ● We have four X values (outlook,temp,humidity and windy) being categorical and one y value (play Y or N) also being categorical.
  • 4. ● So which atrribute do we need to pick first??
  • 5. ● We have to determine the attribute that best classifies the training data; use this attribute at the root of the tree. Repeat this process at for each branch. ● So, now we have to perform Attribute Selection. ● For attribute selection we have to find – Entropy – Information gain
  • 6. Atrribute Selection... ● Selection of an attribute to test at each node - choosing the most useful attribute for classifying examples. ● Information Gain – Measures how well a given attribute separates the training examples according to their target classification. – This measure is used to select among the candidate attributes at each step while growing the tree.
  • 7. Step2... ● Finding Entropy:- – A measure of homogeneity of the set of examples. – Given a set S of positive and negative examples of some tar get concept (a 2-class problem), the entropy of set S relative to this binary classification is E(S) = - p(P)log2 p(P) – p(N)log2 p(N)
  • 8. Step2... ● Example:- ● Suppose S has 25 examples, 15 positive and 10 negatives [15+, 10-]. Then the entropy of S relative to this classificatio n is – E(S) = - p(P)log2 p(P) – p(N)log2 p(N) – E(S)=-(15/25) log2(15/25) - (10/25) log2 (10/25)
  • 9. Step 3... ● Finding Information Gain:- – Information gain measures the expected reduction in entrop y, or uncertainty. – Values(A) is the set of all possible values for attribute A, and Sv th e subset of S for which attribute A has value v Sv = {s in S | A(s) = v}. – the first term in the equation for Gain is just the entropy of the origi nal collection S – the second term is the expected value of the entropy after S is par titioned using attribute A ( ) ( , ) ( ) ( )v v v Values A S Gain S A Entropy S Entropy S S   
  • 11. Calculating Informaiton gain ● Entropy(Decision) = – p(Yes) . log2p(Yes) – p(No) . log2p(No) ● Entropy(Decision) = – (9/14) . log2(9/14) – (5/14) . log2(5/14) = 0.940 ● We need to find the most dominant factor for decisioning.
  • 12. Calculating Informaiton gain ● Gain(Decision, Wind) = Entropy(Decision) – ∑ [ p(Decision|Wind) . Entropy(Decision|Wind) ] ● Gain(Decision, Wind) = Entropy(Decision) – [ p(Decision|Wind=Weak) * Entropy(Decision| Wind=Weak) ] – [ p(Decision|Wind=Strong) * Entropy(Decision|Wind=Strong) ]
  • 13. Calculating Informaiton gain ● Entropy(Decision|Wind=Weak) = – (2/8) . log2(2/8) – (6/8) . log2(6/8) = 0.811 ● Entropy(Decision|Wind=Strong) = – (3/6) . log2(3/6) – (3/6) . log2(3/6) = 1 Now putting all value together:- – Gain(Decision, Wind) =0.940 – [ (8/14) . 0.811 ] – [ (6/14). 1] = 0.048
  • 14. Calculating Informaiton gain ● By applying similar calculation:- ● Gain(Decision, Outlook) = 0.246 ● Gain(Decision, Temperature) = 0.029 ● Gain(Decision, Humidity) = 0.151
  • 15. ● As seen, outlook factor on decision produces the highest score. That’s why, outlook decision will appear in the root node of the tree.
  • 16. Overcast outlook on decision.. Day Outlook Temp 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
  • 17. Overcast outlook on decision.. ● Basically, decision will always be yes if outlook were overcast. ● Here we don’t need for the further classification.
  • 18. Sunny outlook on decision.. Day Outlook Temp 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
  • 19. Sunny outlook on decision... ● Now we have 5 instances so, we will be repeating above step and again find the information gain. ● 1- Gain(Outlook=Sunny|Temperature) = 0.570 ● 2- Gain(Outlook=Sunny|Humidity) = 0.970 ● 3- Gain(Outlook=Sunny|Wind) = 0.019 At this point humidity is the decesion because it produces highest score if outlook were sunny.
  • 20. Sunny outlook on decision... Day Outlook Temp. Humidity Wind Decision 1 Sunny Hot High Weak No 2 Sunny Hot High Strong No 8 Sunny Mild High Weak No Day Outlook Temp. Humidity Wind Decision 9 Sunny Cool Normal Weak Yes 11 Sunny Mild Normal Strong Yes Decision will always be no if humidity were high. Decision will always be yes if humidity were normal.
  • 21. Rain Outlook On Decision... Day Outlook Temp. 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
  • 22. Rain Outlook On Decision... ● Again we will be finding Information Gain from the above 5 instances. ● 1- Gain(Outlook=Rain | Temperature) ● 2- Gain(Outlook=Rain | Humidity) ● 3- Gain(Outlook=Rain | Wind) ● Wind produces the highest score if outlook were rain.
  • 23. Rain Outlook On Decision... Day Outlook Temp. Humidity Wind Decision 4 Rain Mild High Weak Yes 5 Rain Cool Normal Weak Yes 10 Rain Mild Normal Weak Yes Decision will always be yes if wind were weak and outlook were rain. Day Outlook Temp. Humidity Wind Decision 6 Rain Cool Normal Strong No 14 Rain Mild High Strong No Decision will be always no if wind were strong and outlook were rain.
  • 24. ● Repeatedly applying the above step we will get the required Decision Tree.