Hints(2) for :

Lab 2: Implementing a Decision Tree Based Learning Agent in Java
http://www.cs.iastate.edu/~cs572/labs/lab2/lab2.html

Out: Nov 11, 2002
Due: Dec 2, 2002

ComS 572 Principles of Aritifical Intelligence
Dimitris Margaritis
Department of Computer Science
Iowa State University

TA, Jie Bao
Dept of Computer Science
Iowa State University
baojie@cs.iastate.edu
http://www.cs.iastate.edu/~baojie
Nov 18, 2002

    Linear attribute is the real number attribute  For example, in dataset 2, the first lines are (I omit most of the columns):

    Them are all linear attribute also called nominal attribute or continuous attribute

    To convert a linear you can transverse all the data and find the maximal and minimal value of that attribute, split the interval [min, max] into 3, 5 or more small intervals (no matter evenly or not), and define those smaller intervals as discrete domain

Entropy(S) = S -p(I) log2 p(I)

Entropy(S) = - (9/14) Log2 (9/14) - (5/14) Log2 (5/14) = 0.940

Gain(S, A) = Entropy(S) - S ((|Sv| / |S|) * Entropy(Sv))



[Return to Jie Bao's Homepage]