0% found this document useful (0 votes)
31 views5 pages

Decision Tree

The document outlines a program for classification using Decision Tree Learning with two datasets: one for predicting play based on weather conditions and another for predicting class based on demographic factors. It provides examples of the datasets, including attributes like outlook, temperature, humidity, and wind for the first dataset, and age, job status, house ownership, and credit rating for the second. The goal is to classify instances based on these attributes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views5 pages

Decision Tree

The document outlines a program for classification using Decision Tree Learning with two datasets: one for predicting play based on weather conditions and another for predicting class based on demographic factors. It provides examples of the datasets, including attributes like outlook, temperature, humidity, and wind for the first dataset, and age, job status, house ownership, and credit rating for the second. The goal is to classify instances based on these attributes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Write a program to perform classification using Decision Tree Learning

Day outlook temperatur humidity windy play


1 sunny hot high Weak No
2 sunny hot high Strong No
3 overcast hot high Weak Yes
4 rainy mild high Weak Yes
5 rainy cool normal Weak Yes
6 rainy cool normal Strong No
7 overcast cool normal Strong Yes
8 sunny mild high Weak No
9 sunny cool normal Weak Yes
10 rainy mild normal Weak Yes
11 sunny mild normal Strong Yes
12 overcast mild high Strong Yes
13 overcast hot normal Weak Yes
14 rainy mild high Strong No

Sample Output

outlook

sunny overcast rainy

Yes
humidity windy

high normal weak strong

No Yes Yes No
Sample -2

Sample-3

Day Outlook Temprature Humidity Wind Play_Tennis


D1 Sunny Hot High Weak No
D2 Sunny Hot High Strong No
D3 Overcast Hot High Weak Yes
D4 Rain Mild High Weak Yes
D5 Rain Cool Normal Weak Yes
D6 Rain Cool Normal Strong No
D7 Overcast Cool Normal Strong Yes
D8 Sunny Mild High Weak No
D9 Sunny Cool Normal Weak Yes
D10 Rain Mild Normal Weak Yes
D11 Sunny Mild Normal Strong Yes
D12 Overcast Mild High Strong Yes
D13 Overcast Hot Normal Weak Yes
D14 Rain Mild High Strong No
ID Age Job_Status Owns_House Credit_Rating Class

1 Young FALSE FALSE Fair No

2 Young FALSE FALSE Good No

3 Young TRUE FALSE Good Yes

4 Young TRUE TRUE Fair Yes

5 Young FALSE FALSE Fair No

6 Middle FALSE FALSE Fair No

7 Middle FALSE FALSE Good No

8 Middle TRUE TRUE Good Yes

9 Middle FALSE TRUE Excellent Yes

10 Middle FALSE TRUE Excellent Yes

11 Old FALSE TRUE Excellent Yes

12 Old FALSE TRUE Good Yes

13 Old TRUE FALSE Good Yes

14 Old TRUE FALSE Excellent Yes

15 Old FALSE FALSE Fair ?

You might also like