Computer Science 5751 : Machine Learning

Experimentation Code Description

Introduction

For programs 2-5 in 5751 you will be implementing various learning algorithms to get a better understanding of how Machine Learning algorithms work. To enable you to explore the ML algorithms without having to spend too much time programming other code aspects (such as parsing data files) you will be implementing the algorithms by completing a set of experimentation code that I will provide to you. For each project I will provide a new code skeleton with many of the base details set up for you and you will have to complete a small number of functions that pertain to the ML algorithm itself. On this page I will give a short overview of the workings of the experimentation code and Hari will provide a more extensive introduction in lab.

Files and Code Organization

The code will be provided for you in compressed, tared archives. Each archive will contain a directory with a number of .C (code), .h (header) files and a makefile. In addition, there may be scripts for running the code in a particular way plus possibly some simple example data files. Instructions for uncompressing and unpacking the archived code will be provided with each program.

The Make File makefile

In general, to produce all of the executables for a particular project you will simply need to go to the directory containing the code and type "make". The makefile will take care of the rest. If you are unsure of whether or not your .o (object) files or executables are up to date you can eliminate them all and start over by first typing "make clean" and then typing "make".

If for some reason you decide to add a file of your own to the system you will need to change the file makefile. To do this, edit the file and add the .C name and .o name to the appropriate line. In general, if you are adding more files pertaining to a particular learning algorithm you should go to the lines starting with "LEARNMETHSRCS = " and "LEARNMETHOBJS = " and add the .C and .o to the appropriate line. Once you finish editing the makefile you should then update the header dependencies by typing "make depend". This will automatically read your files (and the existing files) for header dependencies. If you get warning from this you should examine the warnings carefully.

Code Files

For the projects you will be pursuing you will generally only have to add to two files, a .C and .h file provided to you. The other files in the code should remain largely untouched (though you are welcome to add debugging comments as you see fit). Below I will give a short description of the other files in the system:

Debugging

As part of the makefile setup, the -g flag is set. This allows you to call gdb on the resulting executables. This will allow you to debug the code without having to spend time adding output statements to the code and recompiling.