Prev: Urgent need of help on Region based operations in matlab
Next: Matching H, S, V value with trigonometry
From: Q on 1 Jul 2010 14:52 Hi, this is my first post here I hope someone could answer my question I am trying to test the svmclassify code from the help % Load the data and select features for classification load variables.mat data = [Matrix(:,3), Matrix(:,4),Matrix(:,5),Matrix(:,6),Matrix(:,7),Matrix(:,8),Matrix(:,9),Matrix(:,10),Matrix(:,11),Matrix(:,12)]; % Extract the Setosa class groups = ismember(species,'member'); % Randomly select training and test sets [train, test] = crossvalind('holdOut',groups); cp = classperf(groups); % Use a linear support vector machine classifier svmStruct = svmtrain(data(train,:),groups(train),'showplot',true); classes = svmclassify(svmStruct,data(test,:),'showplot',true); % See how well the classifier performed classperf(cp,classes,test); cp.CorrectRate the problem is that my matrix is not 2D matrix is this consider a multi-classes SVM?? and I can't use this code?? thanks in advanced |