SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Lehrstuhl fuer Maschinelles Lernen und Natuerlich Sprachliche Systeme Albrecht Zimmernann, Tayfun Guerel,  Kristian Kersting , Prof. Dr. Luc De Raedt,   Machine Learning  in Games Crash Course on Machine Learning
Why Machine Learning? ,[object Object],[object Object],[object Object],[object Object]
Behavioural Cloning / Verhaltensimitation plays logs plays User model
Backgammon ,[object Object],[object Object],[object Object]
TD-Gammon by Tesauro (1995)
Recent Trends ,[object Object],[object Object],[object Object],[object Object]
Three Niches for Machine Learning ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Typical Data Mining task ,[object Object],[object Object],[object Object],[object Object],[object Object]
Data Mining Result ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Credit Risk Analysis ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Other Prediction Problems Process optimization Customer Purchase behavior Customer retention
Problems Too Difficult to Program by Hand ,[object Object]
Problems Too Difficult to Program by Hand ,[object Object]
Software that Customizes to User
Lehrstuhl fuer Maschinelles Lernen und Natuerlich Sprachliche Systeme Albrecht Zimmernann, Tayfun Guerel,  Kristian Kersting , Prof. Dr. Luc De Raedt,   Machine Learning  in Games Crash Course on Decision Tree Learning Refund MarSt TaxInc YES NO NO NO Yes No Married   Single, Divorced < 80K > 80K
Classification: Definition ,[object Object],[object Object],[object Object],[object Object],[object Object]
Illustrating Classification Task
Examples of Classification Task ,[object Object],[object Object],[object Object],[object Object]
Classification Techniques ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Decision Tree for PlayTennis Outlook Sunny Overcast Rain Humidity High Normal Wind Strong Weak No Yes Yes Yes No
Decision Tree for PlayTennis Outlook Sunny Overcast Rain Humidity High Normal No Yes Each internal node tests an attribute Each branch corresponds to an attribute value node Each leaf node assigns a classification
Decision Tree for PlayTennis Outlook Temperature Humidity Wind  PlayTennis Sunny  Hot  High  Weak  ? No Outlook Sunny Overcast Rain Humidity High Normal Wind Strong Weak No Yes Yes Yes No
Decision Tree for Conjunction Outlook Sunny Overcast Rain Wind Strong Weak No Yes No Outlook=Sunny    Wind=Weak No
Decision Tree for Disjunction Outlook Sunny Overcast Rain Yes Outlook=Sunny    Wind=Weak Wind Strong Weak No Yes Wind Strong Weak No Yes
Decision Tree for XOR Outlook Sunny Overcast Rain Wind Strong Weak Yes No Outlook=Sunny  XOR Wind=Weak Wind Strong Weak No Yes Wind Strong Weak No Yes
Decision Tree  ,[object Object],(Outlook=Sunny    Humidity=Normal)     (Outlook=Overcast)    (Outlook=Rain    Wind=Weak) Outlook Sunny Overcast Rain Humidity High Normal Wind Strong Weak No Yes Yes Yes No
When to consider Decision Trees ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Decision Tree Induction ,[object Object],[object Object],[object Object],[object Object],[object Object]
Top-Down Induction of Decision Trees ID3 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Which Attribute is ”best”? ,[object Object],[object Object],[object Object],A 1 =? True False [21+, 5-] [8+, 30-] [29+,35-] A 2 =? True False [18+, 33-] [11+, 2-] [29+,35-]
Entropy ,[object Object],[object Object],[object Object],[object Object],[object Object]
Entropy ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Information Gain ,[object Object],Gain(S,A)=Entropy(S) -   v  values(A)  |S v |/|S| Entropy(S v ) Entropy([29+,35-]) = -29/64 log 2  29/64 – 35/64 log 2  35/64 = 0.99 A 1 =? True False [21+, 5-] [8+, 30-] [29+,35-] A 2 =? True False [18+, 33-] [11+, 2-] [29+,35-]
Information Gain ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Entropy([18+,33-]) = 0.94 Entropy([11+,2-]) = 0.62 Gain(S,A 2 )=Entropy(S) -51/64*Entropy([18+,33-])  -13/64*Entropy([11+,2-]) =0.12 Entropy(S)=Entropy([29+,35-]) = 0.99 A 1 =? True False [21+, 5-] [8+, 30-] [29+,35-] A 2 =? True False [18+, 33-] [11+, 2-] [29+,35-]
Another Example ,[object Object],[object Object],[object Object]
Another Example Humidity High Normal [ 3 +,  4 -] [ 6 +,  1 -] S= [9+,5-] E=0.940 Gain(S,Humidity) =0.940-(7/14)*0.985  –  (7/14)*0.592 =0.151 E=0.985 E=0.592 Wind Weak Strong [ 6 +,  2 -] [ 3 +,  3 -] S= [9+,5-] E=0.940 E=0.811 E=1.0 Gain(S,Wind) =0.940-(8/14)*0.811  –  (6/14)*1.0 =0.048
Yet  Another Example: Playing Tennis No Strong High Mild Rain D14 Yes Weak Normal Hot Overcast D13 Yes Strong High Mild Overcast D12 Yes Strong Normal Mild Sunny D11 Yes Strong Normal Mild Rain D10 Yes Weak Normal Cold Sunny D9 No Weak High Mild Sunny D8 Yes Weak Normal Cool Overcast D7 No Strong Normal Cool Rain D6 Yes Weak Normal Cool Rain D5 Yes Weak High Mild Rain  D4  Yes Weak High Hot Overcast D3 No Strong High Hot Sunny D2 No Weak High Hot Sunny D1 Play Tennis Wind Humidity Temp. Outlook Day
PlayTennis - Selecting Next Attribute Outlook Sunny Rain [ 2 +,  3 -] [ 3 +,  2 -] S= [9+,5-] E=0.940 Gain(S,Outlook) =0.940-(5/14)*0.971  -(4/14)*0.0 – (5/14)*0.0971 =0.247 E=0.971 E=0.971 Over cast [ 4 +,  0 ] E=0.0 Gain(S,Humidity) = 0.151 Gain(S,Wind) = 0.048 Gain(S,Temp) = 0.029
PlayTennis - ID3 Algorithm Outlook Sunny Overcast Rain Yes [D1,D2,…,D14] [9+,5-] S sunny =[D1,D2,D8,D9,D11] [2+,3-] ?  ?  [D3,D7,D12,D13] [4+,0-] [D4,D5,D6,D10,D14] [3+,2-] Gain(S sunny  , Humidity)=0.970-(3/5)0.0 – 2/5(0.0) = 0.970 Gain(S sunny  , Temp.)=0.970-(2/5)0.0 –2/5(1.0)-(1/5)0.0 = 0.570 Gain(S sunny  , Wind)=0.970= -(2/5)1.0 – 3/5(0.918) = 0.019
ID3 Algorithm Outlook Sunny Overcast Rain Humidity High Normal Wind Strong Weak No Yes Yes Yes No [D3,D7,D12,D13] [D8,D9,D11] [D6,D14] [D1,D2] [D4,D5,D10]
Hypothesis Space Search ID3 +  -  + A2 - A4 +  - A2 - A3 -  + +  -  + +  -  + A1 -  -  + +  -  + A2 +  -  -
Hypothesis Space Search ID3 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Converting a Tree to Rules R 1 : If (Outlook=Sunny)    (Humidity=High) Then PlayTennis=No  R 2 : If (Outlook=Sunny)    (Humidity=Normal) Then PlayTennis=Yes R 3 : If (Outlook=Overcast) Then PlayTennis=Yes  R 4 : If (Outlook=Rain)     (Wind=Strong) Then PlayTennis=No R 5 : If (Outlook=Rain)     (Wind=Weak) Then PlayTennis=Yes Outlook Sunny Overcast Rain Humidity High Normal Wind Strong Weak No Yes Yes Yes No
Conclusions ,[object Object],[object Object],[object Object],[object Object],[object Object]

Weitere ähnliche Inhalte

Ähnlich wie Software-Praktikum SoSe 2005 Lehrstuhl fuer Maschinelles ...

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...Learnbay Datascience
 
Introduction to ML and Decision Tree
Introduction to ML and Decision TreeIntroduction to ML and Decision Tree
Introduction to ML and Decision TreeSuman Debnath
 
Machine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree LearningMachine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree Learningbutest
 
unit 5 decision tree2.pptx
unit 5 decision tree2.pptxunit 5 decision tree2.pptx
unit 5 decision tree2.pptxssuser5c580e1
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to AlgorithmsVenkatesh Iyer
 
Classification decision tree
Classification  decision treeClassification  decision tree
Classification decision treeyazad dumasia
 
Decision tree in artificial intelligence
Decision tree in artificial intelligenceDecision tree in artificial intelligence
Decision tree in artificial intelligenceMdAlAmin187
 
Part XIV
Part XIVPart XIV
Part XIVbutest
 
Data Mining Concepts and Techniques.ppt
Data Mining Concepts and Techniques.pptData Mining Concepts and Techniques.ppt
Data Mining Concepts and Techniques.pptRvishnupriya2
 
Data Mining Concepts and Techniques.ppt
Data Mining Concepts and Techniques.pptData Mining Concepts and Techniques.ppt
Data Mining Concepts and Techniques.pptRvishnupriya2
 
www1.cs.columbia.edu
www1.cs.columbia.eduwww1.cs.columbia.edu
www1.cs.columbia.edubutest
 
Decision trees for machine learning
Decision trees for machine learningDecision trees for machine learning
Decision trees for machine learningAmr BARAKAT
 
Genetic Algorithms.ppt
Genetic Algorithms.pptGenetic Algorithms.ppt
Genetic Algorithms.pptRohanBorgalli
 
Deep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAI
Deep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAIDeep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAI
Deep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAIJack Clark
 

Ähnlich wie Software-Praktikum SoSe 2005 Lehrstuhl fuer Maschinelles ... (20)

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...
 
Introduction to ML and Decision Tree
Introduction to ML and Decision TreeIntroduction to ML and Decision Tree
Introduction to ML and Decision Tree
 
Machine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree LearningMachine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree Learning
 
unit 5 decision tree2.pptx
unit 5 decision tree2.pptxunit 5 decision tree2.pptx
unit 5 decision tree2.pptx
 
Ml presentation
Ml presentationMl presentation
Ml presentation
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to Algorithms
 
Classification decision tree
Classification  decision treeClassification  decision tree
Classification decision tree
 
Decision tree in artificial intelligence
Decision tree in artificial intelligenceDecision tree in artificial intelligence
Decision tree in artificial intelligence
 
Part XIV
Part XIVPart XIV
Part XIV
 
Data Mining Concepts and Techniques.ppt
Data Mining Concepts and Techniques.pptData Mining Concepts and Techniques.ppt
Data Mining Concepts and Techniques.ppt
 
Data Mining Concepts and Techniques.ppt
Data Mining Concepts and Techniques.pptData Mining Concepts and Techniques.ppt
Data Mining Concepts and Techniques.ppt
 
Data-Mining
Data-MiningData-Mining
Data-Mining
 
www1.cs.columbia.edu
www1.cs.columbia.eduwww1.cs.columbia.edu
www1.cs.columbia.edu
 
Decision trees for machine learning
Decision trees for machine learningDecision trees for machine learning
Decision trees for machine learning
 
Genetic Algorithms.ppt
Genetic Algorithms.pptGenetic Algorithms.ppt
Genetic Algorithms.ppt
 
ID3 Algorithm
ID3 AlgorithmID3 Algorithm
ID3 Algorithm
 
Decision tree
Decision treeDecision tree
Decision tree
 
Deep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAI
Deep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAIDeep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAI
Deep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAI
 
Unit 3classification
Unit 3classificationUnit 3classification
Unit 3classification
 
Lecture4.pptx
Lecture4.pptxLecture4.pptx
Lecture4.pptx
 

Mehr von butest

EL MODELO DE NEGOCIO DE YOUTUBE
EL MODELO DE NEGOCIO DE YOUTUBEEL MODELO DE NEGOCIO DE YOUTUBE
EL MODELO DE NEGOCIO DE YOUTUBEbutest
 
1. MPEG I.B.P frame之不同
1. MPEG I.B.P frame之不同1. MPEG I.B.P frame之不同
1. MPEG I.B.P frame之不同butest
 
LESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIALLESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIALbutest
 
Timeline: The Life of Michael Jackson
Timeline: The Life of Michael JacksonTimeline: The Life of Michael Jackson
Timeline: The Life of Michael Jacksonbutest
 
Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...
Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...
Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...butest
 
LESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIALLESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIALbutest
 
Com 380, Summer II
Com 380, Summer IICom 380, Summer II
Com 380, Summer IIbutest
 
The MYnstrel Free Press Volume 2: Economic Struggles, Meet Jazz
The MYnstrel Free Press Volume 2: Economic Struggles, Meet JazzThe MYnstrel Free Press Volume 2: Economic Struggles, Meet Jazz
The MYnstrel Free Press Volume 2: Economic Struggles, Meet Jazzbutest
 
MICHAEL JACKSON.doc
MICHAEL JACKSON.docMICHAEL JACKSON.doc
MICHAEL JACKSON.docbutest
 
Social Networks: Twitter Facebook SL - Slide 1
Social Networks: Twitter Facebook SL - Slide 1Social Networks: Twitter Facebook SL - Slide 1
Social Networks: Twitter Facebook SL - Slide 1butest
 
Facebook
Facebook Facebook
Facebook butest
 
Executive Summary Hare Chevrolet is a General Motors dealership ...
Executive Summary Hare Chevrolet is a General Motors dealership ...Executive Summary Hare Chevrolet is a General Motors dealership ...
Executive Summary Hare Chevrolet is a General Motors dealership ...butest
 
Welcome to the Dougherty County Public Library's Facebook and ...
Welcome to the Dougherty County Public Library's Facebook and ...Welcome to the Dougherty County Public Library's Facebook and ...
Welcome to the Dougherty County Public Library's Facebook and ...butest
 
NEWS ANNOUNCEMENT
NEWS ANNOUNCEMENTNEWS ANNOUNCEMENT
NEWS ANNOUNCEMENTbutest
 
C-2100 Ultra Zoom.doc
C-2100 Ultra Zoom.docC-2100 Ultra Zoom.doc
C-2100 Ultra Zoom.docbutest
 
MAC Printing on ITS Printers.doc.doc
MAC Printing on ITS Printers.doc.docMAC Printing on ITS Printers.doc.doc
MAC Printing on ITS Printers.doc.docbutest
 
Mac OS X Guide.doc
Mac OS X Guide.docMac OS X Guide.doc
Mac OS X Guide.docbutest
 
WEB DESIGN!
WEB DESIGN!WEB DESIGN!
WEB DESIGN!butest
 

Mehr von butest (20)

EL MODELO DE NEGOCIO DE YOUTUBE
EL MODELO DE NEGOCIO DE YOUTUBEEL MODELO DE NEGOCIO DE YOUTUBE
EL MODELO DE NEGOCIO DE YOUTUBE
 
1. MPEG I.B.P frame之不同
1. MPEG I.B.P frame之不同1. MPEG I.B.P frame之不同
1. MPEG I.B.P frame之不同
 
LESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIALLESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIAL
 
Timeline: The Life of Michael Jackson
Timeline: The Life of Michael JacksonTimeline: The Life of Michael Jackson
Timeline: The Life of Michael Jackson
 
Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...
Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...
Popular Reading Last Updated April 1, 2010 Adams, Lorraine The ...
 
LESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIALLESSONS FROM THE MICHAEL JACKSON TRIAL
LESSONS FROM THE MICHAEL JACKSON TRIAL
 
Com 380, Summer II
Com 380, Summer IICom 380, Summer II
Com 380, Summer II
 
PPT
PPTPPT
PPT
 
The MYnstrel Free Press Volume 2: Economic Struggles, Meet Jazz
The MYnstrel Free Press Volume 2: Economic Struggles, Meet JazzThe MYnstrel Free Press Volume 2: Economic Struggles, Meet Jazz
The MYnstrel Free Press Volume 2: Economic Struggles, Meet Jazz
 
MICHAEL JACKSON.doc
MICHAEL JACKSON.docMICHAEL JACKSON.doc
MICHAEL JACKSON.doc
 
Social Networks: Twitter Facebook SL - Slide 1
Social Networks: Twitter Facebook SL - Slide 1Social Networks: Twitter Facebook SL - Slide 1
Social Networks: Twitter Facebook SL - Slide 1
 
Facebook
Facebook Facebook
Facebook
 
Executive Summary Hare Chevrolet is a General Motors dealership ...
Executive Summary Hare Chevrolet is a General Motors dealership ...Executive Summary Hare Chevrolet is a General Motors dealership ...
Executive Summary Hare Chevrolet is a General Motors dealership ...
 
Welcome to the Dougherty County Public Library's Facebook and ...
Welcome to the Dougherty County Public Library's Facebook and ...Welcome to the Dougherty County Public Library's Facebook and ...
Welcome to the Dougherty County Public Library's Facebook and ...
 
NEWS ANNOUNCEMENT
NEWS ANNOUNCEMENTNEWS ANNOUNCEMENT
NEWS ANNOUNCEMENT
 
C-2100 Ultra Zoom.doc
C-2100 Ultra Zoom.docC-2100 Ultra Zoom.doc
C-2100 Ultra Zoom.doc
 
MAC Printing on ITS Printers.doc.doc
MAC Printing on ITS Printers.doc.docMAC Printing on ITS Printers.doc.doc
MAC Printing on ITS Printers.doc.doc
 
Mac OS X Guide.doc
Mac OS X Guide.docMac OS X Guide.doc
Mac OS X Guide.doc
 
hier
hierhier
hier
 
WEB DESIGN!
WEB DESIGN!WEB DESIGN!
WEB DESIGN!
 

Software-Praktikum SoSe 2005 Lehrstuhl fuer Maschinelles ...

  • 1. Lehrstuhl fuer Maschinelles Lernen und Natuerlich Sprachliche Systeme Albrecht Zimmernann, Tayfun Guerel, Kristian Kersting , Prof. Dr. Luc De Raedt, Machine Learning in Games Crash Course on Machine Learning
  • 2.
  • 3. Behavioural Cloning / Verhaltensimitation plays logs plays User model
  • 4.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. Other Prediction Problems Process optimization Customer Purchase behavior Customer retention
  • 12.
  • 13.
  • 15. Lehrstuhl fuer Maschinelles Lernen und Natuerlich Sprachliche Systeme Albrecht Zimmernann, Tayfun Guerel, Kristian Kersting , Prof. Dr. Luc De Raedt, Machine Learning in Games Crash Course on Decision Tree Learning Refund MarSt TaxInc YES NO NO NO Yes No Married Single, Divorced < 80K > 80K
  • 16.
  • 18.
  • 19.
  • 20. Decision Tree for PlayTennis Outlook Sunny Overcast Rain Humidity High Normal Wind Strong Weak No Yes Yes Yes No
  • 21. Decision Tree for PlayTennis Outlook Sunny Overcast Rain Humidity High Normal No Yes Each internal node tests an attribute Each branch corresponds to an attribute value node Each leaf node assigns a classification
  • 22. Decision Tree for PlayTennis Outlook Temperature Humidity Wind PlayTennis Sunny Hot High Weak ? No Outlook Sunny Overcast Rain Humidity High Normal Wind Strong Weak No Yes Yes Yes No
  • 23. Decision Tree for Conjunction Outlook Sunny Overcast Rain Wind Strong Weak No Yes No Outlook=Sunny  Wind=Weak No
  • 24. Decision Tree for Disjunction Outlook Sunny Overcast Rain Yes Outlook=Sunny  Wind=Weak Wind Strong Weak No Yes Wind Strong Weak No Yes
  • 25. Decision Tree for XOR Outlook Sunny Overcast Rain Wind Strong Weak Yes No Outlook=Sunny XOR Wind=Weak Wind Strong Weak No Yes Wind Strong Weak No Yes
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36. Another Example Humidity High Normal [ 3 +, 4 -] [ 6 +, 1 -] S= [9+,5-] E=0.940 Gain(S,Humidity) =0.940-(7/14)*0.985 – (7/14)*0.592 =0.151 E=0.985 E=0.592 Wind Weak Strong [ 6 +, 2 -] [ 3 +, 3 -] S= [9+,5-] E=0.940 E=0.811 E=1.0 Gain(S,Wind) =0.940-(8/14)*0.811 – (6/14)*1.0 =0.048
  • 37. Yet Another Example: Playing Tennis No Strong High Mild Rain D14 Yes Weak Normal Hot Overcast D13 Yes Strong High Mild Overcast D12 Yes Strong Normal Mild Sunny D11 Yes Strong Normal Mild Rain D10 Yes Weak Normal Cold Sunny D9 No Weak High Mild Sunny D8 Yes Weak Normal Cool Overcast D7 No Strong Normal Cool Rain D6 Yes Weak Normal Cool Rain D5 Yes Weak High Mild Rain D4 Yes Weak High Hot Overcast D3 No Strong High Hot Sunny D2 No Weak High Hot Sunny D1 Play Tennis Wind Humidity Temp. Outlook Day
  • 38. PlayTennis - Selecting Next Attribute Outlook Sunny Rain [ 2 +, 3 -] [ 3 +, 2 -] S= [9+,5-] E=0.940 Gain(S,Outlook) =0.940-(5/14)*0.971 -(4/14)*0.0 – (5/14)*0.0971 =0.247 E=0.971 E=0.971 Over cast [ 4 +, 0 ] E=0.0 Gain(S,Humidity) = 0.151 Gain(S,Wind) = 0.048 Gain(S,Temp) = 0.029
  • 39. PlayTennis - ID3 Algorithm Outlook Sunny Overcast Rain Yes [D1,D2,…,D14] [9+,5-] S sunny =[D1,D2,D8,D9,D11] [2+,3-] ? ? [D3,D7,D12,D13] [4+,0-] [D4,D5,D6,D10,D14] [3+,2-] Gain(S sunny , Humidity)=0.970-(3/5)0.0 – 2/5(0.0) = 0.970 Gain(S sunny , Temp.)=0.970-(2/5)0.0 –2/5(1.0)-(1/5)0.0 = 0.570 Gain(S sunny , Wind)=0.970= -(2/5)1.0 – 3/5(0.918) = 0.019
  • 40. ID3 Algorithm Outlook Sunny Overcast Rain Humidity High Normal Wind Strong Weak No Yes Yes Yes No [D3,D7,D12,D13] [D8,D9,D11] [D6,D14] [D1,D2] [D4,D5,D10]
  • 41. Hypothesis Space Search ID3 + - + A2 - A4 + - A2 - A3 - + + - + + - + A1 - - + + - + A2 + - -
  • 42.
  • 43. Converting a Tree to Rules R 1 : If (Outlook=Sunny)  (Humidity=High) Then PlayTennis=No R 2 : If (Outlook=Sunny)  (Humidity=Normal) Then PlayTennis=Yes R 3 : If (Outlook=Overcast) Then PlayTennis=Yes R 4 : If (Outlook=Rain)  (Wind=Strong) Then PlayTennis=No R 5 : If (Outlook=Rain)  (Wind=Weak) Then PlayTennis=Yes Outlook Sunny Overcast Rain Humidity High Normal Wind Strong Weak No Yes Yes Yes No
  • 44.