I am trying to use SVM to do a binary classification from a very high dimensional dataset which is a 3249X40
matrix. I have five similar datasets. While I get results from Decision tree properly(low but different), I get exactly same result from SVM everytime whatever dataset I may use. I use svm in following way:
svmModel = svmtrain(train_mat(trainIdx,:), groups(trainIdx), ...
'Autoscale',true, 'Showplot',false, 'Method','QP', ...
'BoxConstraint',2e-1, 'Kernel_Function','rbf', 'RBF_Sigma',1);
pred = svmclassify(svmModel, train_mat(testIdx,:), 'Showplot',false);
What's wrong with it? I am using Decision tree like this:
tree=ClassificationTree.fit(train_mat(trainIdx,:),groups(trainIdx,:));
pred=tree.predict(train_mat(testIdx,:));
I am getting different results(which appear correct as well) from those 5 datasets in decision tree. What's wrong? Is it because SVM cannot handle such datasets that have very few observations compared to number of variables?