In this project we attempt to train a linear SVM classifer that can determine what class of image an image instance belongs to by feeding the classifer a large amount of training data. The pipeline is as follows:
Lastly we want to analyze our results by building a confusion matrix.
For each class C we run a number of test images that belongs to C through the SVM. We define the result of the SVM
to be the class that the SVM gives the highest confidence to.
Each row of the matrix represents a histogram that counts
the number of images in our test group for a class C that fall under each class type.
After normalizing each row of the matrix, we would ideally end up with an identity matrix (100% accuracy for each class type).
Given the above algorithm here are results, which fall under an acceptable range of accuracy. The accuracy value was determined by taking the average of the diagonal
of the confusion matrix.
Note: I ran the program on multiple vocabulary sizes to observe the effect on having more or less words
Note that as we increase the vocabulary size our accuracy increases although the rate of increase drops fairly quickly as the size grows.