Weka - Attribute Selection Measure: Information Gain (ID3)

In decision tree learning, ID3 (Iterative Dichotomiser 3) is an algorithm invented by Ross Quinlan[1] used to generate a decision tree from a dataset. ID3 is the precursor to the C4.5 algorithm, and is typically used in the machine learning and natural language processing domains. - Wikipedia

Data that will be test is :


We do attribute selection by using Information Gain as Attribute Evaluator. Here are the result : 
From the above result, we can see that Outlook is the best split, while Day does not give any contribute to output, so we can remove Day attribute to test with Id3.

For those who don't have Id3 in their weka, you can download in from package manager named "simpleEducationalLearningSchemes".

After you have downloaded, you can got to Classifier - > trees - > Id3  to test the data. Before you start, you can click on More Options then click Choose - >  PlainText


 After that you can start the process of Id3. Here are the results.

Id3 can't visualize tree, but we can draw the tree based on the result given above.

Here are trees. From the Information Gain, we get the best split is Outlook attribute, so Id3 use Outlook as the root node, then followed by temperature and windy. 

That's all. Thanks!

Share this

Related Posts

Previous
Next Post »

2 comments

comments
21 April 2017 at 16:46 delete

Nak mintak tolong ajar balik boleh ke, abam Arip :p

Reply
avatar
8 May 2018 at 12:26 delete

Hi Ariff, can you check your linkedin or send your contact to my email at ruzanna_rusly@tgv.com.my
Need to discuss on career opportunity at TGV Cinemas. Thanks.

Reply
avatar