title: 10 fold cross-validation in one-against-all SVM (using LibSVM)
body: <p>I want to do a 10-fold cross-validation in my <strong>one-against-all</strong> <a href="http://en.wikipedia.org/wiki/Support_vector_machine" rel="nofollow noreferrer">support vector machine</a> classification in MATLAB.</p>
  
  <p>I tried to somehow mix these two related answers:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/a/9049808/1071703">Multi-class classification in libsvm</a></li>
  <li><a href="https://stackoverflow.com/a/3071938/1071703">Example of 10-fold SVM classification in MATLAB</a></li>
  </ul>
  
  <p>But as I'm new to MATLAB and its syntax, I didn't manage to make it work till now.</p>
  
  <p>On the other hand, I saw just the following few lines about cross validation in the <a href="http://www.csie.ntu.edu.tw/~cjlin/libsvm/" rel="nofollow noreferrer">LibSVM</a> README files and I couldn't find any related example there:</p>
  
  <blockquote>
    <p>option -v randomly splits the data into n parts and calculates cross
    validation accuracy/mean squared error on them.</p>
    
    <p>See libsvm FAQ for the meaning of outputs.</p>
  </blockquote>
  
  <p>Could anyone provide me an example of 10-fold cross-validation and one-against-all classification?</p>