These files are to classify spam emails using Support Vector Mechine, SVM.
As the ungraded/optional exercise of the coursera course 'Mechine Learning' of Andrew Ng, these files contain functions written by Andrew such as readFile.m, porterStemmer.m, svmTrain.m, and svmPredict.m. Thank Dr. Ng for providing such a great course.
Data used should be downloaded from the SpamAssassin Public Corpus (http://spamassassin.apache.org/old/publiccorpus/ ) and saved in the folder of SpamData. There is a simple guide in the folder.
Please run script files as following steps:
Step1 run VocabList.m with adjusting n
Step2 run SplitSets.m with adjusting n (in line with the n in % step 1)
Step3 run this .m file with adjusting n (in line with the n in step 1)