SlideShare a Scribd company logo
1 of 12
Download to read offline
การสร้างโมเดล Decision Tree 

สำหรับแอตทริบิวต์ที่มีค่าตัวเลข
(data)3

base|warehouse|mining
http://www.dataminingtrend.com

http://facebook.com/datacube.th
Eakasit Pacharawongsakda, Ph.D.
Data Cube: http://facebook.com/datacube.th
E-mail: eakasit@datacube.asia
(data)3

base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Decision Tree
• ข้อมูลเป็นตัวเลข
• เรียงลำดับข้อมูลที่เป็นตัวเลขจากน้อยไปมาก
• แบ่งข้อมูลออกเป็น 2 ส่วนโดยการหาจุดกึ่งกลางระหว่างค่าตัวเลข 2 ค่า
• คำนวณค่า Information Gain จากข้อมูล 2 ส่วนที่แบ่งได้
• เลือกจุดกึ่งกลางที่ให้ค่า Information Gain สูงที่สุดมาใช้งานต่อ
2
(data)3

base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Decision Tree
• ข้อมูลเป็นตัวเลข
• เมื่อใช้ Humidity = 67.5 เป็นตัวแบ่ง ได้ค่า IG = 0.11
3
ID Humidity Play
7 65.0 no
6 70.0 no
9 70.0 yes
11 70.0 yes
13 75.0 yes
3 78.0 no
5 80.0 yes
10 80.0 no
14 80.0 yes
1 85.0 yes
2 90.0 yes
12 90.0 yes
8 95.0 yes
4 96.0 no
ค่าเฉลี่ย = 67.5
ID Humidity Play
7 < 67.5 no
6 > 67.5 no
9 > 67.5 yes
11 > 67.5 yes
13 > 67.5 yes
3 > 67.5 no
5 > 67.5 yes
10 > 67.5 no
14 > 67.5 yes
1 > 67.5 yes
2 > 67.5 yes
12 > 67.5 yes
8 > 67.5 yes
4 > 67.5 no
กลุ่มที่ 1
กลุ่มที่ 2
(data)3

base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Decision Tree
• ข้อมูลเป็นตัวเลข
• เมื่อใช้ Humidity = 72.5 เป็นตัวแบ่ง ได้ค่า IG = 0.25
4
ID Humidity Play
7 65.0 no
6 70.0 no
9 70.0 yes
11 70.0 yes
13 75.0 yes
3 78.0 no
5 80.0 yes
10 80.0 no
14 80.0 yes
1 85.0 yes
2 90.0 yes
12 90.0 yes
8 95.0 yes
4 96.0 no
ค่าเฉลี่ย = 72.5
ID Humidity Play
7 < 72.5 no
6 < 72.5 no
9 < 72.5 yes
11 < 72.5 yes
13 > 72.5 yes
3 > 72.5 no
5 > 72.5 yes
10 > 72.5 no
14 > 72.5 yes
1 > 72.5 yes
2 > 72.5 yes
12 > 72.5 yes
8 > 72.5 yes
4 > 72.5 no
กลุ่มที่ 2
กลุ่มที่ 1
(data)3

base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Decision Tree
• ข้อมูลเป็นตัวเลข
• เมื่อใช้ Humidity = 76.5 เป็นตัวแบ่ง ได้ค่า IG = 0.03
5
ID Humidity Play
7 65.0 no
6 70.0 no
9 70.0 yes
11 70.0 yes
13 75.0 yes
3 78.0 no
5 80.0 yes
10 80.0 no
14 80.0 yes
1 85.0 yes
2 90.0 yes
12 90.0 yes
8 95.0 yes
4 96.0 no
ค่าเฉลี่ย = 76.5
ID Humidity Play
7 < 76.5 no
6 < 76.5 no
9 < 76.5 yes
11 < 76.5 yes
13 < 76.5 yes
3 > 76.5 no
5 > 76.5 yes
10 > 76.5 no
14 > 76.5 yes
1 > 76.5 yes
2 > 76.5 yes
12 > 76.5 yes
8 > 76.5 yes
4 > 76.5 no
กลุ่มที่ 1
กลุ่มที่ 2
(data)3

base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Decision Tree
• ข้อมูลเป็นตัวเลข
• เมื่อใช้ Humidity = 79.0 เป็นตัวแบ่ง ได้ค่า IG = 0.05
6
ID Humidity Play
7 65.0 no
6 70.0 no
9 70.0 yes
11 70.0 yes
13 75.0 yes
3 78.0 no
5 80.0 yes
10 80.0 no
14 80.0 yes
1 85.0 yes
2 90.0 yes
12 90.0 yes
8 95.0 yes
4 96.0 no
ค่าเฉลี่ย = 79.0
ID Humidity Play
7 < 79.0 no
6 < 79.0 no
9 < 79.0 yes
11 < 79.0 yes
13 < 79.0 yes
3 < 79.0 no
5 > 79.0 yes
10 > 79.0 no
14 > 79.0 yes
1 > 79.0 yes
2 > 79.0 yes
12 > 79.0 yes
8 > 79.0 yes
4 > 79.0 no
กลุ่มที่ 1
กลุ่มที่ 2
(data)3

base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Decision Tree
• ข้อมูลเป็นตัวเลข
• เมื่อใช้ Humidity = 82.5 เป็นตัวแบ่ง ได้ค่า IG = 0.05
7
ID Humidity Play
7 65.0 no
6 70.0 no
9 70.0 yes
11 70.0 yes
13 75.0 yes
3 78.0 no
5 80.0 yes
10 80.0 no
14 80.0 yes
1 85.0 yes
2 90.0 yes
12 90.0 yes
8 95.0 yes
4 96.0 no
ค่าเฉลี่ย = 82.5
ID Humidity Play
7 < 82.5 no
6 < 82.5 no
9 < 82.5 yes
11 < 82.5 yes
13 < 82.5 yes
3 < 82.5 no
5 < 82.5 yes
10 < 82.5 no
14 < 82.5 yes
1 > 82.5 yes
2 > 82.5 yes
12 > 82.5 yes
8 > 82.5 yes
4 > 82.5 no
กลุ่มที่ 1
กลุ่มที่ 2
(data)3

base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Decision Tree
• ข้อมูลเป็นตัวเลข
• เมื่อใช้ Humidity = 87.5 เป็นตัวแบ่ง ได้ค่า IG = 0.02
8
ID Humidity Play
7 65.0 no
6 70.0 no
9 70.0 yes
11 70.0 yes
13 75.0 yes
3 78.0 no
5 80.0 yes
10 80.0 no
14 80.0 yes
1 85.0 yes
2 90.0 yes
12 90.0 yes
8 95.0 yes
4 96.0 no
ค่าเฉลี่ย = 87.5
ID Humidity Play
7 < 87.5 no
6 < 87.5 no
9 < 87.5 yes
11 < 87.5 yes
13 < 87.5 yes
3 < 87.5 no
5 < 87.5 yes
10 < 87.5 no
14 < 87.5 yes
1 < 87.5 yes
2 > 87.5 yes
12 > 87.5 yes
8 > 87.5 yes
4 > 87.5 no
กลุ่มที่ 1
กลุ่มที่ 2
(data)3

base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Decision Tree
• ข้อมูลเป็นตัวเลข
• เมื่อใช้ Humidity = 92.5 เป็นตัวแบ่ง ได้ค่า IG = 0.01
9
ID Humidity Play
7 65.0 no
6 70.0 no
9 70.0 yes
11 70.0 yes
13 75.0 yes
3 78.0 no
5 80.0 yes
10 80.0 no
14 80.0 yes
1 85.0 yes
2 90.0 yes
12 90.0 yes
8 95.0 yes
4 96.0 no
ค่าเฉลี่ย = 92.5
ID Humidity Play
7 < 92.5 no
6 < 92.5 no
9 < 92.5 yes
11 < 92.5 yes
13 < 92.5 yes
3 < 92.5 no
5 < 92.5 yes
10 < 92.5 no
14 < 92.5 yes
1 < 92.5 yes
2 < 92.5 yes
12 < 92.5 yes
8 > 92.5 yes
4 > 92.5 no
กลุ่มที่ 1
กลุ่มที่ 2
(data)3

base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Decision Tree
• ข้อมูลเป็นตัวเลข
• เมื่อใช้ Humidity = 95.5 เป็นตัวแบ่ง ได้ค่า IG = 0.01
10
ID Humidity Play
7 65.0 no
6 70.0 no
9 70.0 yes
11 70.0 yes
13 75.0 yes
3 78.0 no
5 80.0 yes
10 80.0 no
14 80.0 yes
1 85.0 yes
2 90.0 yes
12 90.0 yes
8 95.0 yes
4 96.0 no
ค่าเฉลี่ย = 95.5
ID Humidity Play
7 < 95.5 no
6 < 95.5 no
9 < 95.5 yes
11 < 95.5 yes
13 < 95.5 yes
3 < 95.5 no
5 < 95.5 yes
10 < 95.5 no
14 < 95.5 yes
1 < 95.5 yes
2 < 95.5 yes
12 < 95.5 yes
8 > 95.5 yes
4 > 95.5 no
กลุ่มที่ 1
กลุ่มที่ 2
(data)3

base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Decision Tree
• ข้อมูลเป็นตัวเลข
11
ID Humidity Play
7 65.0 no
6 70.0 no
9 70.0 yes
11 70.0 yes
13 75.0 yes
3 78.0 no
5 80.0 yes
10 80.0 no
14 80.0 yes
1 85.0 yes
2 90.0 yes
12 90.0 yes
8 95.0 yes
4 96.0 no
จุดตัด IG
67.5 0.11
72.5 0.25
76.5 0.03
79.0 0.05
82.5 0.05
87.5 0.02
92.5 0.01
95.5 0.01
ตารางจุดตัดและค่า Information Gain (IG)
ให้ค่า IG มากที่สุด
(data)3

base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Decision Tree
• ในกรณีที่ใช้แอตทริบิวต์ Humidity จะได้เป็น
12
Humidity
< 72.5 > 72.5
แอตทริบิวต์ play = yes
แอตทริบิวต์ play = no

More Related Content

What's hot

Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search TreeZafar Ayub
 
Python Pyplot Class XII
Python Pyplot Class XIIPython Pyplot Class XII
Python Pyplot Class XIIajay_opjs
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data ScienceSrishti44
 
Data mining (lecture 1 & 2) conecpts and techniques
Data mining (lecture 1 & 2) conecpts and techniquesData mining (lecture 1 & 2) conecpts and techniques
Data mining (lecture 1 & 2) conecpts and techniquesSaif Ullah
 
Лекция 4. Префиксные деревья (Tries, prefix trees)
Лекция 4. Префиксные деревья (Tries, prefix trees)Лекция 4. Префиксные деревья (Tries, prefix trees)
Лекция 4. Префиксные деревья (Tries, prefix trees)Mikhail Kurnosov
 
Big data analytics, research report
Big data analytics, research reportBig data analytics, research report
Big data analytics, research reportJULIO GONZALEZ SANZ
 
Data science & data scientist
Data science & data scientistData science & data scientist
Data science & data scientistVijayMohan Vasu
 
01 introduction to data mining
01 introduction to data mining01 introduction to data mining
01 introduction to data miningphakhwan22
 
Capter10 cluster basic : Han & Kamber
Capter10 cluster basic : Han & KamberCapter10 cluster basic : Han & Kamber
Capter10 cluster basic : Han & KamberHouw Liong The
 
Hierarchical clustering
Hierarchical clustering Hierarchical clustering
Hierarchical clustering Ashek Farabi
 
Uniform indexing load with cluster reroute api
Uniform indexing load with cluster reroute apiUniform indexing load with cluster reroute api
Uniform indexing load with cluster reroute apiHiroshi Yoshioka
 
Data Science
Data ScienceData Science
Data ScienceRabin BK
 
trees in data structure
trees in data structure trees in data structure
trees in data structure shameen khan
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data ScienceANOOP V S
 

What's hot (20)

Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search Tree
 
Python Pyplot Class XII
Python Pyplot Class XIIPython Pyplot Class XII
Python Pyplot Class XII
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Data mining (lecture 1 & 2) conecpts and techniques
Data mining (lecture 1 & 2) conecpts and techniquesData mining (lecture 1 & 2) conecpts and techniques
Data mining (lecture 1 & 2) conecpts and techniques
 
2 3 tree
2 3 tree2 3 tree
2 3 tree
 
3 classification
3  classification3  classification
3 classification
 
Лекция 4. Префиксные деревья (Tries, prefix trees)
Лекция 4. Префиксные деревья (Tries, prefix trees)Лекция 4. Префиксные деревья (Tries, prefix trees)
Лекция 4. Префиксные деревья (Tries, prefix trees)
 
Big data analytics, research report
Big data analytics, research reportBig data analytics, research report
Big data analytics, research report
 
Data science & data scientist
Data science & data scientistData science & data scientist
Data science & data scientist
 
210413 data101day23
210413 data101day23210413 data101day23
210413 data101day23
 
01 introduction to data mining
01 introduction to data mining01 introduction to data mining
01 introduction to data mining
 
Capter10 cluster basic : Han & Kamber
Capter10 cluster basic : Han & KamberCapter10 cluster basic : Han & Kamber
Capter10 cluster basic : Han & Kamber
 
Textmining Introduction
Textmining IntroductionTextmining Introduction
Textmining Introduction
 
Data science
Data scienceData science
Data science
 
Hierarchical clustering
Hierarchical clustering Hierarchical clustering
Hierarchical clustering
 
Uniform indexing load with cluster reroute api
Uniform indexing load with cluster reroute apiUniform indexing load with cluster reroute api
Uniform indexing load with cluster reroute api
 
Data Science
Data ScienceData Science
Data Science
 
Insertion Sort
Insertion SortInsertion Sort
Insertion Sort
 
trees in data structure
trees in data structure trees in data structure
trees in data structure
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 

Viewers also liked

Opinion Mining Tutorial (Sentiment Analysis)
Opinion Mining Tutorial (Sentiment Analysis)Opinion Mining Tutorial (Sentiment Analysis)
Opinion Mining Tutorial (Sentiment Analysis)Kavita Ganesan
 

Viewers also liked (16)

Practical Data Mining with RapidMiner Studio 7 : A Basic and Intermediate
Practical Data Mining with RapidMiner Studio 7 : A Basic and IntermediatePractical Data Mining with RapidMiner Studio 7 : A Basic and Intermediate
Practical Data Mining with RapidMiner Studio 7 : A Basic and Intermediate
 
Preprocessing with RapidMiner Studio 6
Preprocessing with RapidMiner Studio 6Preprocessing with RapidMiner Studio 6
Preprocessing with RapidMiner Studio 6
 
Evaluation metrics: Precision, Recall, F-Measure, ROC
Evaluation metrics: Precision, Recall, F-Measure, ROCEvaluation metrics: Precision, Recall, F-Measure, ROC
Evaluation metrics: Precision, Recall, F-Measure, ROC
 
Search Twitter with RapidMiner Studio 6
Search Twitter with RapidMiner Studio 6Search Twitter with RapidMiner Studio 6
Search Twitter with RapidMiner Studio 6
 
05 classification 1 decision tree and rule based classification
05 classification 1 decision tree and rule based classification05 classification 1 decision tree and rule based classification
05 classification 1 decision tree and rule based classification
 
Advanced Predictive Modeling with R and RapidMiner Studio 7
Advanced Predictive Modeling with R and RapidMiner Studio 7Advanced Predictive Modeling with R and RapidMiner Studio 7
Advanced Predictive Modeling with R and RapidMiner Studio 7
 
Weka classification
Weka classificationWeka classification
Weka classification
 
Opinion Mining Tutorial (Sentiment Analysis)
Opinion Mining Tutorial (Sentiment Analysis)Opinion Mining Tutorial (Sentiment Analysis)
Opinion Mining Tutorial (Sentiment Analysis)
 
Install weka extension_rapidminer
Install weka extension_rapidminerInstall weka extension_rapidminer
Install weka extension_rapidminer
 
Apply (Big) Data Analytics & Predictive Analytics to Business Application
Apply (Big) Data Analytics & Predictive Analytics to Business ApplicationApply (Big) Data Analytics & Predictive Analytics to Business Application
Apply (Big) Data Analytics & Predictive Analytics to Business Application
 
Predictive analytic-for-retail-business
Predictive analytic-for-retail-businessPredictive analytic-for-retail-business
Predictive analytic-for-retail-business
 
Data mining and_big_data_web
Data mining and_big_data_webData mining and_big_data_web
Data mining and_big_data_web
 
การติดตั้ง RapidMiner Studio 6.1
การติดตั้ง RapidMiner Studio 6.1การติดตั้ง RapidMiner Studio 6.1
การติดตั้ง RapidMiner Studio 6.1
 
Introduction to Feature (Attribute) Selection with RapidMiner Studio 6
Introduction to Feature (Attribute) Selection with RapidMiner Studio 6Introduction to Feature (Attribute) Selection with RapidMiner Studio 6
Introduction to Feature (Attribute) Selection with RapidMiner Studio 6
 
Introduction to Weka: Application approach
Introduction to Weka: Application approachIntroduction to Weka: Application approach
Introduction to Weka: Application approach
 
Practical Data Mining: FP-Growth
Practical Data Mining: FP-GrowthPractical Data Mining: FP-Growth
Practical Data Mining: FP-Growth
 

Building Decision Tree model with numerical attributes

  • 1. การสร้างโมเดล Decision Tree 
 สำหรับแอตทริบิวต์ที่มีค่าตัวเลข (data)3
 base|warehouse|mining http://www.dataminingtrend.com
 http://facebook.com/datacube.th Eakasit Pacharawongsakda, Ph.D. Data Cube: http://facebook.com/datacube.th E-mail: eakasit@datacube.asia
  • 2. (data)3
 base|warehouse|mining http://dataminingtrend.com http://facebook.com/datacube.th Decision Tree • ข้อมูลเป็นตัวเลข • เรียงลำดับข้อมูลที่เป็นตัวเลขจากน้อยไปมาก • แบ่งข้อมูลออกเป็น 2 ส่วนโดยการหาจุดกึ่งกลางระหว่างค่าตัวเลข 2 ค่า • คำนวณค่า Information Gain จากข้อมูล 2 ส่วนที่แบ่งได้ • เลือกจุดกึ่งกลางที่ให้ค่า Information Gain สูงที่สุดมาใช้งานต่อ 2
  • 3. (data)3
 base|warehouse|mining http://dataminingtrend.com http://facebook.com/datacube.th Decision Tree • ข้อมูลเป็นตัวเลข • เมื่อใช้ Humidity = 67.5 เป็นตัวแบ่ง ได้ค่า IG = 0.11 3 ID Humidity Play 7 65.0 no 6 70.0 no 9 70.0 yes 11 70.0 yes 13 75.0 yes 3 78.0 no 5 80.0 yes 10 80.0 no 14 80.0 yes 1 85.0 yes 2 90.0 yes 12 90.0 yes 8 95.0 yes 4 96.0 no ค่าเฉลี่ย = 67.5 ID Humidity Play 7 < 67.5 no 6 > 67.5 no 9 > 67.5 yes 11 > 67.5 yes 13 > 67.5 yes 3 > 67.5 no 5 > 67.5 yes 10 > 67.5 no 14 > 67.5 yes 1 > 67.5 yes 2 > 67.5 yes 12 > 67.5 yes 8 > 67.5 yes 4 > 67.5 no กลุ่มที่ 1 กลุ่มที่ 2
  • 4. (data)3
 base|warehouse|mining http://dataminingtrend.com http://facebook.com/datacube.th Decision Tree • ข้อมูลเป็นตัวเลข • เมื่อใช้ Humidity = 72.5 เป็นตัวแบ่ง ได้ค่า IG = 0.25 4 ID Humidity Play 7 65.0 no 6 70.0 no 9 70.0 yes 11 70.0 yes 13 75.0 yes 3 78.0 no 5 80.0 yes 10 80.0 no 14 80.0 yes 1 85.0 yes 2 90.0 yes 12 90.0 yes 8 95.0 yes 4 96.0 no ค่าเฉลี่ย = 72.5 ID Humidity Play 7 < 72.5 no 6 < 72.5 no 9 < 72.5 yes 11 < 72.5 yes 13 > 72.5 yes 3 > 72.5 no 5 > 72.5 yes 10 > 72.5 no 14 > 72.5 yes 1 > 72.5 yes 2 > 72.5 yes 12 > 72.5 yes 8 > 72.5 yes 4 > 72.5 no กลุ่มที่ 2 กลุ่มที่ 1
  • 5. (data)3
 base|warehouse|mining http://dataminingtrend.com http://facebook.com/datacube.th Decision Tree • ข้อมูลเป็นตัวเลข • เมื่อใช้ Humidity = 76.5 เป็นตัวแบ่ง ได้ค่า IG = 0.03 5 ID Humidity Play 7 65.0 no 6 70.0 no 9 70.0 yes 11 70.0 yes 13 75.0 yes 3 78.0 no 5 80.0 yes 10 80.0 no 14 80.0 yes 1 85.0 yes 2 90.0 yes 12 90.0 yes 8 95.0 yes 4 96.0 no ค่าเฉลี่ย = 76.5 ID Humidity Play 7 < 76.5 no 6 < 76.5 no 9 < 76.5 yes 11 < 76.5 yes 13 < 76.5 yes 3 > 76.5 no 5 > 76.5 yes 10 > 76.5 no 14 > 76.5 yes 1 > 76.5 yes 2 > 76.5 yes 12 > 76.5 yes 8 > 76.5 yes 4 > 76.5 no กลุ่มที่ 1 กลุ่มที่ 2
  • 6. (data)3
 base|warehouse|mining http://dataminingtrend.com http://facebook.com/datacube.th Decision Tree • ข้อมูลเป็นตัวเลข • เมื่อใช้ Humidity = 79.0 เป็นตัวแบ่ง ได้ค่า IG = 0.05 6 ID Humidity Play 7 65.0 no 6 70.0 no 9 70.0 yes 11 70.0 yes 13 75.0 yes 3 78.0 no 5 80.0 yes 10 80.0 no 14 80.0 yes 1 85.0 yes 2 90.0 yes 12 90.0 yes 8 95.0 yes 4 96.0 no ค่าเฉลี่ย = 79.0 ID Humidity Play 7 < 79.0 no 6 < 79.0 no 9 < 79.0 yes 11 < 79.0 yes 13 < 79.0 yes 3 < 79.0 no 5 > 79.0 yes 10 > 79.0 no 14 > 79.0 yes 1 > 79.0 yes 2 > 79.0 yes 12 > 79.0 yes 8 > 79.0 yes 4 > 79.0 no กลุ่มที่ 1 กลุ่มที่ 2
  • 7. (data)3
 base|warehouse|mining http://dataminingtrend.com http://facebook.com/datacube.th Decision Tree • ข้อมูลเป็นตัวเลข • เมื่อใช้ Humidity = 82.5 เป็นตัวแบ่ง ได้ค่า IG = 0.05 7 ID Humidity Play 7 65.0 no 6 70.0 no 9 70.0 yes 11 70.0 yes 13 75.0 yes 3 78.0 no 5 80.0 yes 10 80.0 no 14 80.0 yes 1 85.0 yes 2 90.0 yes 12 90.0 yes 8 95.0 yes 4 96.0 no ค่าเฉลี่ย = 82.5 ID Humidity Play 7 < 82.5 no 6 < 82.5 no 9 < 82.5 yes 11 < 82.5 yes 13 < 82.5 yes 3 < 82.5 no 5 < 82.5 yes 10 < 82.5 no 14 < 82.5 yes 1 > 82.5 yes 2 > 82.5 yes 12 > 82.5 yes 8 > 82.5 yes 4 > 82.5 no กลุ่มที่ 1 กลุ่มที่ 2
  • 8. (data)3
 base|warehouse|mining http://dataminingtrend.com http://facebook.com/datacube.th Decision Tree • ข้อมูลเป็นตัวเลข • เมื่อใช้ Humidity = 87.5 เป็นตัวแบ่ง ได้ค่า IG = 0.02 8 ID Humidity Play 7 65.0 no 6 70.0 no 9 70.0 yes 11 70.0 yes 13 75.0 yes 3 78.0 no 5 80.0 yes 10 80.0 no 14 80.0 yes 1 85.0 yes 2 90.0 yes 12 90.0 yes 8 95.0 yes 4 96.0 no ค่าเฉลี่ย = 87.5 ID Humidity Play 7 < 87.5 no 6 < 87.5 no 9 < 87.5 yes 11 < 87.5 yes 13 < 87.5 yes 3 < 87.5 no 5 < 87.5 yes 10 < 87.5 no 14 < 87.5 yes 1 < 87.5 yes 2 > 87.5 yes 12 > 87.5 yes 8 > 87.5 yes 4 > 87.5 no กลุ่มที่ 1 กลุ่มที่ 2
  • 9. (data)3
 base|warehouse|mining http://dataminingtrend.com http://facebook.com/datacube.th Decision Tree • ข้อมูลเป็นตัวเลข • เมื่อใช้ Humidity = 92.5 เป็นตัวแบ่ง ได้ค่า IG = 0.01 9 ID Humidity Play 7 65.0 no 6 70.0 no 9 70.0 yes 11 70.0 yes 13 75.0 yes 3 78.0 no 5 80.0 yes 10 80.0 no 14 80.0 yes 1 85.0 yes 2 90.0 yes 12 90.0 yes 8 95.0 yes 4 96.0 no ค่าเฉลี่ย = 92.5 ID Humidity Play 7 < 92.5 no 6 < 92.5 no 9 < 92.5 yes 11 < 92.5 yes 13 < 92.5 yes 3 < 92.5 no 5 < 92.5 yes 10 < 92.5 no 14 < 92.5 yes 1 < 92.5 yes 2 < 92.5 yes 12 < 92.5 yes 8 > 92.5 yes 4 > 92.5 no กลุ่มที่ 1 กลุ่มที่ 2
  • 10. (data)3
 base|warehouse|mining http://dataminingtrend.com http://facebook.com/datacube.th Decision Tree • ข้อมูลเป็นตัวเลข • เมื่อใช้ Humidity = 95.5 เป็นตัวแบ่ง ได้ค่า IG = 0.01 10 ID Humidity Play 7 65.0 no 6 70.0 no 9 70.0 yes 11 70.0 yes 13 75.0 yes 3 78.0 no 5 80.0 yes 10 80.0 no 14 80.0 yes 1 85.0 yes 2 90.0 yes 12 90.0 yes 8 95.0 yes 4 96.0 no ค่าเฉลี่ย = 95.5 ID Humidity Play 7 < 95.5 no 6 < 95.5 no 9 < 95.5 yes 11 < 95.5 yes 13 < 95.5 yes 3 < 95.5 no 5 < 95.5 yes 10 < 95.5 no 14 < 95.5 yes 1 < 95.5 yes 2 < 95.5 yes 12 < 95.5 yes 8 > 95.5 yes 4 > 95.5 no กลุ่มที่ 1 กลุ่มที่ 2
  • 11. (data)3
 base|warehouse|mining http://dataminingtrend.com http://facebook.com/datacube.th Decision Tree • ข้อมูลเป็นตัวเลข 11 ID Humidity Play 7 65.0 no 6 70.0 no 9 70.0 yes 11 70.0 yes 13 75.0 yes 3 78.0 no 5 80.0 yes 10 80.0 no 14 80.0 yes 1 85.0 yes 2 90.0 yes 12 90.0 yes 8 95.0 yes 4 96.0 no จุดตัด IG 67.5 0.11 72.5 0.25 76.5 0.03 79.0 0.05 82.5 0.05 87.5 0.02 92.5 0.01 95.5 0.01 ตารางจุดตัดและค่า Information Gain (IG) ให้ค่า IG มากที่สุด
  • 12. (data)3
 base|warehouse|mining http://dataminingtrend.com http://facebook.com/datacube.th Decision Tree • ในกรณีที่ใช้แอตทริบิวต์ Humidity จะได้เป็น 12 Humidity < 72.5 > 72.5 แอตทริบิวต์ play = yes แอตทริบิวต์ play = no