title: libsvm multiclass classification - does imbalance in training data matter
body: <p><img src="https://i.stack.imgur.com/dXx1A.jpg" alt="enter image description here">I'm using libsvm in Matlab to classify a dataset with 5 classes. Data here is 2-D but I don't think it matters.</p>
  
  <p>The amount of testing data for each class is balanced. For training data, when I use 5 training sample for each class, the classification result is good. However, when I change the number of training data for a class (say class 2) from 5 to 10, the classification accuracy is poor, especially for class 2.</p>
  
  <p>The code I use is very simple:</p>
  
  <pre><code>model = svmtrain2(trainLabels, trainData ); 
  [LabelSVM] = svmpredict2(testLabels, testData, model);
  </code></pre>
  
  <p>Is that because there's any options in <code>svmtrain2</code> that I should specify? Or it's caused by something else? Thank you.</p>