title: Plot result of 10 fold cross-validation in one-against-all SVM (using LibSVM)
body: <p>I want to plot result of <code>libsvmtrain_ova</code> in this link:
  <a href="https://stackoverflow.com/questions/14024740/10-fold-cross-validation-in-one-against-all-svm-using-libsvm/14083978#14083978">10 fold cross-validation in one-against-all SVM (using LibSVM)</a> </p>
  
  <p>, I used this code within <code>libsvmtrain_ova</code> but i think it is not working properly.</p>
  
  <pre><code>hold off
  figure();
  for j=1:numLabels
     w = models{j}.SVs' * models {j}.sv_coef;
     b = -models{j}.rho;
     c1 = find(double(labels==1) == 1);
     c2= find(double(labels==2) == 1);
     c3=find(double(labels==3) == 1);
     plot(X(c1,1), X(c1,2), 'ko', 'MarkerFaceColor', 'b'); hold on;
     plot(X(c2,1), X(c2,2), 'ko', 'MarkerFaceColor', 'g');hold on;
     plot(X(c3,1), X(c3,2), 'ko', 'MarkerFaceColor', 'r')
     % Plot the decision boundary
     plot_x = linspace(min(X(:,1)), max(X(:,1)), 30);
     plot_y = (-1/w(2))*(w(1)*plot_x + b);
     plot(plot_x, plot_y, 'k-', 'LineWidth', 2)
  end
  title(sprintf('SVM Linear Classifier with C = %g', 1), 'FontSize', 12)
  </code></pre>