COSC-288: Machine Learning

Project 5
Spring 2021

Due: F 5/7 @ 11:59 P.M.
10 points

Last one! \o/

  1. Implement WTU by modifying your implementations of DTU and the related classes from p3 so that WTU learns from weighted examples.

  2. Implement Weighted Decision Stumps as WDS by modifying your implementation of WTU.

  3. Implement Flach's Algorithm 11.1 as the executable Bagging. By default, Bagging should produce 10 classifiers. Predict by voting. Use the switch -b for specifying the base learner to bag. You can accomplish this by using reflection to construct a Classifier from its name stored in a String:
    import java.lang.reflect.*;
    ...
    case "-b": // base learner
      Class<?> c = Class.forName( options[++a] );
      this.classifier = (Classifier) c.getDeclaredConstructor().newInstance();
    
    As an example, to bag decision stumps, we can use the command:
    $ java Bagging -b WDS -t vote.mff
    

  4. Implement Flach's Algorithm 11.3 as the executable Boosting. By default, Boosting should produce 10 classifiers. Use the switch -b for specifying the base learner to boost.

The implementations must follow sound principles of object-oriented Implement each learner as a single executable. No windows. No menus. No prompts. Just do it.

The logic of the implementation should be the same as that for the previous implementations. If the user runs a learner and specifies only a training set, then the program should evaluate using 10-fold cross-validation and output the results. Naturally, the user can use the -x switch to change the default. If the user provides the -p switch and a proportion, then the program conducts an evaluation using the hold-out method. Otherwise, if the user specifies both a training and testing set, then the program should build a model from the training set, evaluate it on the testing set, and output the results.

Instructions for Submission

In a file named HONOR, please include the statement:
In accordance with the class policies and Georgetown's Honor System,
I certify that, with the exceptions of the class resources and those
items noted below, I have neither given nor received any assistance
on this project.

Name
NetID
Include this file in your zip file submit.zip.

Submit p5 exactly like you submitted p4. Make sure you remove all debugging output before submitting.

Plan B

If Autolab is down, upload your zip file to Canvas.

Copyright © 2019 Mark Maloof. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.