title: Weka error "cannot handle numeric class" in Java code using LibSVM
body: <p>I'm trying to use a classifier LibSVM-based using Weka, but i got this error:</p>
  
  <pre><code>Exception in thread "main" weka.core.UnsupportedAttributeTypeException:weka.classifiers.functions.LibSVM: Cannot handle numeric class!
      at weka.core.Capabilities.test(Unknown Source)
      at weka.core.Capabilities.test(Unknown Source)
      at weka.core.Capabilities.test(Unknown Source)
      at weka.core.Capabilities.testWithFail(Unknown Source)
      at weka.classifiers.functions.LibSVM.buildClassifier(Unknown Source)
      at imgclassifier.ImgClassifier.main(ImgClassifier.java:45)
  Java Result: 1
  </code></pre>
  
  <p>this is my code:</p>
  
  <pre><code>try {
  
     File f = new File("australian.txt");
     LibSVMLoader loader = new LibSVMLoader();
     loader.setSource(f);
     Instances i = loader.getDataSet();
  
     LibSVM svm = new LibSVM();
     svm.buildClassifier(i);
  
  }catch (IIOException e) {
     e.printStackTrace();
  }
  </code></pre>
  
  <p>australian.txt is an example taken here:<a href="http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html#australian" rel="noreferrer">LibSVM DataSets</a>
  can anyone explain me where is the error?
  thanks in advance</p>