SlideShare a Scribd company logo
การสร้างโมเดล 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

Practical Data Mining: FP-Growth
Practical Data Mining: FP-GrowthPractical Data Mining: FP-Growth
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
Big Data Engineering, Faculty of Engineering, Dhurakij Pundit University
 
Data manipulation with RapidMiner Studio 7
Data manipulation with RapidMiner Studio 7Data manipulation with RapidMiner Studio 7
Preprocessing with RapidMiner Studio 6
Preprocessing with RapidMiner Studio 6Preprocessing with RapidMiner Studio 6
Introduction to Data Mining and Big Data Analytics
Introduction to Data Mining and Big Data AnalyticsIntroduction to Data Mining and Big Data Analytics
Introduction to Data Mining and Big Data Analytics
Big Data Engineering, Faculty of Engineering, Dhurakij Pundit University
 
Date warehousing concepts
Date warehousing conceptsDate warehousing concepts
Date warehousing conceptspcherukumalla
 
Introduction to Predictive Analytics with case studies
Introduction to Predictive Analytics with case studiesIntroduction to Predictive Analytics with case studies
Introduction to Predictive Analytics with case studies
Big Data Engineering, Faculty of Engineering, Dhurakij Pundit University
 
揭开数据虚拟化的神秘面纱
揭开数据虚拟化的神秘面纱揭开数据虚拟化的神秘面纱
揭开数据虚拟化的神秘面纱
Denodo
 
Data Vault Overview
Data Vault OverviewData Vault Overview
Data Vault Overview
Empowered Holdings, LLC
 
Why Data Vault?
Why Data Vault? Why Data Vault?
Why Data Vault?
Kent Graziano
 
Data Science Tutorial | Introduction To Data Science | Data Science Training ...
Data Science Tutorial | Introduction To Data Science | Data Science Training ...Data Science Tutorial | Introduction To Data Science | Data Science Training ...
Data Science Tutorial | Introduction To Data Science | Data Science Training ...
Edureka!
 
Introduction to Data Analytics with RapidMiner Studio 6 (ภาษาไทย)
Introduction to Data Analytics with RapidMiner Studio 6 (ภาษาไทย)Introduction to Data Analytics with RapidMiner Studio 6 (ภาษาไทย)
Introduction to Data Analytics with RapidMiner Studio 6 (ภาษาไทย)
Big Data Engineering, Faculty of Engineering, Dhurakij Pundit University
 
Data warehouse architecture
Data warehouse architectureData warehouse architecture
Data warehouse architecture
uncleRhyme
 
Metadata Use Cases You Can Use
Metadata Use Cases You Can UseMetadata Use Cases You Can Use
Metadata Use Cases You Can Usedmurph4
 
Data Warehouse Design and Best Practices
Data Warehouse Design and Best PracticesData Warehouse Design and Best Practices
Data Warehouse Design and Best Practices
Ivo Andreev
 

What's hot (20)

Practical Data Mining: FP-Growth
Practical Data Mining: FP-GrowthPractical Data Mining: FP-Growth
Practical Data Mining: FP-Growth
 
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
 
Data manipulation with RapidMiner Studio 7
Data manipulation with RapidMiner Studio 7Data manipulation with RapidMiner Studio 7
Data manipulation with RapidMiner Studio 7
 
03 data preprocessing
03 data preprocessing03 data preprocessing
03 data preprocessing
 
Preprocessing with RapidMiner Studio 6
Preprocessing with RapidMiner Studio 6Preprocessing with RapidMiner Studio 6
Preprocessing with RapidMiner Studio 6
 
01 introduction to data mining
01 introduction to data mining01 introduction to data mining
01 introduction to data mining
 
Introduction to Data Mining and Big Data Analytics
Introduction to Data Mining and Big Data AnalyticsIntroduction to Data Mining and Big Data Analytics
Introduction to Data Mining and Big Data Analytics
 
Data mining
Data   miningData   mining
Data mining
 
Date warehousing concepts
Date warehousing conceptsDate warehousing concepts
Date warehousing concepts
 
Introduction to Predictive Analytics with case studies
Introduction to Predictive Analytics with case studiesIntroduction to Predictive Analytics with case studies
Introduction to Predictive Analytics with case studies
 
揭开数据虚拟化的神秘面纱
揭开数据虚拟化的神秘面纱揭开数据虚拟化的神秘面纱
揭开数据虚拟化的神秘面纱
 
07 classification 3 neural network
07 classification 3 neural network07 classification 3 neural network
07 classification 3 neural network
 
1 weka introducing
1 weka introducing1 weka introducing
1 weka introducing
 
Data Vault Overview
Data Vault OverviewData Vault Overview
Data Vault Overview
 
Why Data Vault?
Why Data Vault? Why Data Vault?
Why Data Vault?
 
Data Science Tutorial | Introduction To Data Science | Data Science Training ...
Data Science Tutorial | Introduction To Data Science | Data Science Training ...Data Science Tutorial | Introduction To Data Science | Data Science Training ...
Data Science Tutorial | Introduction To Data Science | Data Science Training ...
 
Introduction to Data Analytics with RapidMiner Studio 6 (ภาษาไทย)
Introduction to Data Analytics with RapidMiner Studio 6 (ภาษาไทย)Introduction to Data Analytics with RapidMiner Studio 6 (ภาษาไทย)
Introduction to Data Analytics with RapidMiner Studio 6 (ภาษาไทย)
 
Data warehouse architecture
Data warehouse architectureData warehouse architecture
Data warehouse architecture
 
Metadata Use Cases You Can Use
Metadata Use Cases You Can UseMetadata Use Cases You Can Use
Metadata Use Cases You Can Use
 
Data Warehouse Design and Best Practices
Data Warehouse Design and Best PracticesData Warehouse Design and Best Practices
Data Warehouse Design and Best Practices
 

Viewers also liked

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
Big Data Engineering, Faculty of Engineering, Dhurakij Pundit University
 
Search Twitter with RapidMiner Studio 6
Search Twitter with RapidMiner Studio 6Search Twitter with RapidMiner Studio 6
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
Big Data Engineering, Faculty of Engineering, Dhurakij Pundit University
 
Introduction to Text Classification with RapidMiner Studio 7
Introduction to Text Classification with RapidMiner Studio 7Introduction to Text Classification with RapidMiner Studio 7
Introduction to Text Classification with RapidMiner Studio 7
Big Data Engineering, Faculty of Engineering, Dhurakij Pundit University
 
Opinion Mining Tutorial (Sentiment Analysis)
Opinion Mining Tutorial (Sentiment Analysis)Opinion Mining Tutorial (Sentiment Analysis)
Opinion Mining Tutorial (Sentiment Analysis)
Kavita Ganesan
 
Install weka extension_rapidminer
Install weka extension_rapidminerInstall 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
Big Data Engineering, Faculty of Engineering, Dhurakij Pundit University
 
Predictive analytic-for-retail-business
Predictive analytic-for-retail-businessPredictive analytic-for-retail-business
Data mining and_big_data_web
Data mining and_big_data_webData mining and_big_data_web
การติดตั้ง RapidMiner Studio 6.1
การติดตั้ง RapidMiner Studio 6.1การติดตั้ง RapidMiner Studio 6.1
การติดตั้ง RapidMiner Studio 6.1
Big Data Engineering, Faculty of Engineering, Dhurakij Pundit University
 
Introduction to Weka: Application approach
Introduction to Weka: Application approachIntroduction to Weka: Application approach

Viewers also liked (11)

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
 
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
 
Introduction to Text Classification with RapidMiner Studio 7
Introduction to Text Classification with RapidMiner Studio 7Introduction to Text Classification with RapidMiner Studio 7
Introduction to Text Classification with RapidMiner Studio 7
 
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 Weka: Application approach
Introduction to Weka: Application approachIntroduction to Weka: Application approach
Introduction to Weka: Application approach
 

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