title: How to use SVM in Matlab?
body: <p>I am new to <em>Matlab</em>. Is there any sample code for classifying some data (with 41 features) with a <strong>SVM</strong> and then visualize the result? I want to classify a data set (which has five classes) using the <strong>SVM</strong> method.
  I read the "<a href="http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf" rel="nofollow">A Practical Guide to Support Vector Classication</a>" article and I saw some examples. My dataset is <strong>kdd99</strong>. I wrote the following code:</p>
  
  <pre><code>%% Load Data
  [data,colNames] = xlsread('TarainingDataset.xls');
  groups = ismember(colNames(:,42),'normal.'); 
  TrainInputs = data;
  TrainTargets = groups;
  %% Design SVM
  C = 100;
  svmstruct = svmtrain(TrainInputs,TrainTargets,...
      'boxconstraint',C,...
      'kernel_function','rbf',...
      'rbf_sigma',0.5,...
      'showplot','false');
  %% Test SVM
  [dataTset,colNamesTest] = xlsread('TestDataset.xls');
  TestInputs = dataTset;
  groups = ismember(colNamesTest(:,42),'normal.'); 
  TestOutputs = svmclassify(svmstruct,TestInputs,'showplot','false');
  </code></pre>
  
  <p>but I don't know that how to get <em>accuracy</em> or <em>mse</em> of my classification, and I use <code>showplot</code> in my <code>svmclassify</code> but when is <code>true</code>, I get this warning:</p>
  
  <pre><code>The display option can only plot 2D training data
  </code></pre>
  
  <p>Could anyone please help me?</p>