title: Multiclass SVM example
body: <p>I trying to understand first example code from this <a href="http://accord-framework.net/docs/html/T_Accord_MachineLearning_VectorMachines_MulticlassSupportVectorMachine.htm" rel="nofollow noreferrer">Page</a></p>
  
  <pre><code>double[][] inputs =
  {
  //               input         output
  new double[] { 0, 1, 1, 0 }, //  0 
  new double[] { 0, 1, 0, 0 }, //  0
  new double[] { 0, 0, 1, 0 }, //  0
  new double[] { 0, 1, 1, 0 }, //  0
  new double[] { 0, 1, 0, 0 }, //  0
  new double[] { 1, 0, 0, 0 }, //  1
  new double[] { 1, 0, 0, 0 }, //  1
  new double[] { 1, 0, 0, 1 }, //  1
  new double[] { 0, 0, 0, 1 }, //  1
  new double[] { 0, 0, 0, 1 }, //  1
  new double[] { 1, 1, 1, 1 }, //  2
  new double[] { 1, 0, 1, 1 }, //  2
  new double[] { 1, 1, 0, 1 }, //  2
  new double[] { 0, 1, 1, 1 }, //  2
  new double[] { 1, 1, 1, 1 }, //  2
  };
  
  int[] outputs = // those are the class labels
  {
  0, 0, 0, 0, 0,
  1, 1, 1, 1, 1,
  2, 2, 2, 2, 2,
  };
  
  var teacher = new MulticlassSupportVectorLearning&lt;Linear&gt;()
  {
  // using LIBLINEAR's L2-loss SVC dual for each SVM
    Learner = (p) =&gt; new LinearDualCoordinateDescent()
    {
      Loss = Loss.L2
    }
  };
  teacher.ParallelOptions.MaxDegreeOfParallelism = 1;
  var machine = teacher.Learn(inputs, outputs);
  int[] predicted = machine.Decide(inputs);
  double error = new ZeroOneLoss(outputs).Loss(predicted);
  </code></pre>
  
  <p>So far i think that i understand how this code works correct me if i am wrong.
  It has some random data as <code>input</code> and some labeled classes as <code>output</code>. Through those <code>input</code> and <code>output</code> it uses the <code>MultiClass SVM</code> to label the <code>inputs</code> with the values of the <code>outputs</code>. </p>
  
  <p>So far so good but i got confused when i try to put different data as <code>input</code>.
  I tried to change the dataset with different combinations of 0 and 1</p>
  
  <p>For example i changed the first line {0,1,1,0} to {1,1,1,1} and i am getting value of 1 for that line in the <code>predicted array</code> why is this happening ? Should not be the value for that line equal 0 in the <code>predicted array</code> ? Because the <code>output array</code> has the first 5 values as 0 ?</p>