I am trying to train a linear SVM on a data which has 100 dimensions. I have 80 instances for training. I train the SVM using fitcsvm
function in MATLAB and check the function using predict
on the training data. When I classify the training data with the SVM all the data points are being classified into only one class.
SVM = fitcsvm(votes,b,'ClassNames',unique(b)');
predict(SVM,votes);
This gives outputs as all 0's which corresponds to 0th class. b
contains 1's and 0's indicating the class to which each data point belongs.
The data used, i.e. matrix votes
and vector b
are given the following link