.po 1i
.ll 6.5i
.nr ps 11
.nr pp 11
.ce 10
\fB\s16Homework 2: Multiple Concept ID3\fP\s0
.sp
.sz 14
CS 395T: Machine Learning
.sp .5
Due: Thursday, February 25
.sp
.ce 0
.pp
A micro-version of the ID3 decision tree learning system is in the file ID3.
It can be tested on the examples in FIGURE-DOMAIN or the weather example from
Quinlan's article (in the file WEATHER-DOMAIN).  The current system is capable
of building a decision tree for distinguishing only two categories. In order
to learn to discriminate multiple categories, a decision tree must be built to
distinguish examples of each category from examples of every other category
using the function ID3-CATEGORIES (analogous to VS-CATEGORIES in the
version-space system).  Your assignment is to change the system so that it can
learn a \fIsingle\fP decision tree for distinguishing instances of multiple
categories.
.pp
First you will have to redefine the function ID3-CATEGORIES so that
it passes ID3 a list of examples where each example is of the form
(category-name instance) where category-name can be any atom not just
+ or -.  Then ID3 will have to be changed to handle multiple categories.
Assume the information needed to distinguish N categories is:
.EQ
I(k sub 1 , k sub 2 ,..., k sub N ) ~=~ - sum from j=1 to N {k sub j} over S log
sub 2 {k sub j} over S
.EN
where k\*<j\*> is the number of examples in the jth category and S is the
total number of examples i.e.
.EQ
S = sum from j=1 to N k sub j
.EN
Analogously, assume the expected information required for the tree with A
as root is:
.EQ
E(A) ~=~ sum from i=1 to V {sum from j=1 to N {k sub j} sub i} over S 
I({k sub 1} sub i , {k sub 2} sub i ,..., {k sub N} sub i )
.EN
where k\*<ji\*> is the number of examples in the jth class and with
the ith value for attribute A. The functions MAKE-DECISION-TREE,
EXPECTED-INFO, and INFO will all have to be changed to deal with multiple
categories.  A couple of small additional functions may also be needed.
You may also want to save the multiple-category decision tree in a global
variable to facilitate testing it on subsequent instances.
.pp
The last paragraph in Quinlan's article makes an unsubstantiated claim that
learning multiple decision trees (i.e. one for each category) may be better
than learning one decision tree for all of the categories.  You will test this
claim empirically on the full soybean data set in the file SOYBEAN-DATA.
First use the function ID3-CATEGORIES in the original system to learn a
separate decision tree for each of the 17 different diseases and test these
decision trees using TEST-CATEGORIES.  Run 6 different learn and test cycles
using 4, 6, 8, 10, 12 and 14 training examples.  The number of training
instances can be set by calling the function SEPARATE-INSTANCES before each
run. Record the run time and overall percent correct for each run.  Next, use
the system you have built to construct a single decision tree for all 17
diseases and also test this approach on 4, 6, 8, 10, 12, and 14 training
instances, again recording the run time and the overall % correct for each
run.  Testing this single tree with TEST-INSTANCES will require modifying the
function TEST-INSTANCE.
.pp
Hand in your commented code, a table reporting your experimental results, and
a dribbled run of your system on the full soybean data set.  This time, do not
turn on the *TRACE-ID3* flag for your dribble file, just make sure to include
a printout of the constructed tree and a testing of this tree for 10 training
instances.  If you have an explanation for the results then please include it.
This time I don't have a good explanation.
