Readme
Cmput 466 / 551 -- Homework 1  

Old Datasets and Functions CORRECTED Datasets and Functions (re-revised 5/Oct to correct *.m file)  

Datasets

Name
Description
twodim
extra: 2-dimensional data
glass extra: UCI dataset
musk
extra: UCI dataset
Data1
simple dataset
Data2
not so simple dataset
Data3
even less simple dataset
LearningCurve
Data for problem 8d
CHALLENGE
Data for problem 8e
In each case, using the filename "<name>.mat" -- eg, "twodim.mat".
(The datasets twodim, glass and musk are just to help you test your algorithms; no need to hand in anything here. )

Name of 5 datasets To load data from a *.m file into MATLAB, use the following command in the MATLAB command window :

>> load <filename>

Each dataset file contains two variables: data Name of 5 datasets (the actual data elements) and target Name of 5 datasets (the corresponding class labels, each of which is either +1 or -1).

Functions

Name
Description
nfoldcv(n, data, target, f)
Computes n-fold CV error on data with a given classification function f -- kinda. View this as a template: eg, still need to worry about balanced folds, etc
plotdata(data, target)
Plot two-dimensional classified data
plotline(b)
Plot a two-dimensional linear separator line (b is weight vector)
testerror(data, target, b)
Computes test error, given weight vector b

More detailed information about each function can be found by using the help command or looking at the m-files.