CSCE 478/878 (Fall 2012) Homework 1

Assigned Monday, September 10
Due Friday, September 28 Sunday, September 30 at 11:59 p.m.

When you hand in your results from this homework, you should submit the following, in separate files:

  1. A single tarball or zip file called username.tar.gz or username.zip, where username is your username on cse. In this tar file, put:
  2. A single .pdf file with your writeup of the results for all the homework problems. Only pdf will be accepted, and you should only submit one pdf file, with the name username.pdf, where username is your username on cse. Include all your plots in this file, as well as a detailed summary of your experimental setup, results, and conclusions. If you have several plots, you might put a few example ones in the main text and defer the rest to an appendix. Remember that the quality of your writeup strongly affects your grade. See the web page on ``Tips on Presenting Technical Material''.

Submit everything by the due date and time using the web-based handin program.

On this homework, you must work on your own and submit your own results written in your own words.


  1. (10 pts) Do Problem 2.7 on p. 48.

  2. (10 pts) Do Problem 3.1 on p. 77.

  3. (10 pts) Do Problem 3.2 on p. 77. Show your work.

  4. (40 pts) Implement the ID3 algorithm from Table 3.1 (p. 56). You will train and test your algorithm on three different data sets from the UCI Machine Learning Repository. You must use both the "Congressional Voting Records" and "Monks I" data sets. For the third data set, you may choose any that you wish, but you should note the following when making your selection.
  5. Let U1, U2, and U3 be your three data sets. From each set Ui remove 30 examples, placing them in set Ti (Ti will serve as the test set for experiment i). We will refer to the set of examples left over in Ui as Di, i.e. Di is the set of examples in Ui that are not in Ti. Use Di to train a decision tree with your ID3 implementation, and test that tree on Ti. Report the accuracies for each data set in your writeup.

    You are to submit a detailed, well-written report, with real conclusions and everything. In particular, you should attempt to answer the following questions. How large of a tree did ID3 produce for each learning problem? Did overfitting occur? Would pruning the tree reduce overfitting? In your report, you should also discuss how you randomly selected the test sets Ti. From your report, the reader should be able to get enough information to repeat your experiments, and the reader should be convinced that your methods are sound, e.g. that your sampling methods are sufficiently random. Refer to Numerical Recipes if you have questions about simulating random processes.

    Extra credit opportunities for this problem include (but are not limited to) running on extra data sets, varying the training set size to gauge overfitting, handling continuous-valued attributes, and handling unspecified attribute values. The amount of extra credit is commensurate with the level of extra effort and the quality of your report of the results.


    The following problem is only for students registered for CSCE 878. CSCE 478 students who do it will receive extra credit, but the amount will be less than the number of points indicated.

  6. (25 pts) Rerun your ID3 experiments with rule post-pruning, testing on the same data sets as before. You will therefore need to set aside at least 30 of your training examples for validation during pruning. Report accuracies as before to determine the decrease in test error that rule post-pruning yields. (To make your comparisons fair with the non-pruning case, you are advised to not train on the validation set in Problem 1, i.e. build the tree on the exact same set of examples for this problem and Problem 1.)

Return to the CSCE 478/878 (Fall 2012) Home Page

Last modified 26 September 2012; please report problems to sscott.