title: accord.net compute function for svm is not working
body: <p>I copied this code from accord.net online documentation. Its not working for some reason.
  <a href="http://accord-ramework.net/docs/html/T_Accord_MachineLearning_VectorMachines_SupportVectorMachine.htm" rel="nofollow">http://accord-ramework.net/docs/html/T_Accord_MachineLearning_VectorMachines_SupportVectorMachine.htm</a></p>
  
  <pre><code>using System;
  using System.Windows;
  using Accord.Controls;
  using Accord.MachineLearning.VectorMachines;
  using Accord.MachineLearning.VectorMachines.Learning;
  using Accord.Math;
  using Accord.Statistics.Kernels;
  namespace accord
  {
  class Program
  {
      [MTAThread]
      static void Main(string[] args)
      {
          // Example AND problem
          double[][] inputs =
          {
              new double[] { 0, 0 }, // 0 and 0: 0 (label -1)
              new double[] { 0, 1 }, // 0 and 1: 0 (label -1)
              new double[] { 1, 0 }, // 1 and 0: 0 (label -1)
              new double[] { 1, 1 }  // 1 and 1: 1 (label +1)
          };
  
          // Dichotomy SVM outputs should be given as [-1;+1]
          int[] labels =
      {
          // 0,  0,  0, 1
            -1, -1, -1, 1
      };
  
          // Create a Support Vector Machine for the given inputs
          SupportVectorMachine machine = new SupportVectorMachine(inputs[0].Length);
  
          // Instantiate a new learning algorithm for SVMs
          SequentialMinimalOptimization smo = new SequentialMinimalOptimization(machine, inputs, labels);
  
          // Set up the learning algorithm
          smo.Complexity = 1.0;
  
          // Run the learning algorithm
          double error = smo.Run();
  
          // Compute the decision output for one of the input vectors
  </code></pre>
  
  <p>***** this line is showing error. It says 'SVM' does not exists.</p>
  
  <pre><code>        int decision = System.Math.Sign(svm.Compute(inputs[0]));
  
          Console.Write(decision);
      }
  }
  </code></pre>
  
  <p>}</p>