title: Get attributes weights/importance in SVM classification
body: <p>I'm trying to classify some data using SVM classification, implemented in weka library. My code for classification looks like:</p>
  
  <pre><code>BufferedReader reader = new BufferedReader(new FileReader(arffDataFile));
  
  Instances data = new Instances(reader);
  reader.close();
  
  data.setClassIndex(0);
  
  NumericToNominal filter = new NumericToNominal();
  
  String[] options = new String[2];
  
  options[0] = "-R";
  options[1] = "1";
  
  filter.setOptions(options);
  filter.setInputFormat(data);
  
  Instances newData = Filter.useFilter(data, filter);
  newData.setClassIndex(0);
  
  weka.classifiers.functions.LibSVM svm = new weka.classifiers.functions.LibSVM();
  svm.buildClassifier(newData);
  
  Evaluation eval = new Evaluation(newData);
  eval.crossValidateModel(svm, newData, folds, new Random(1));
  
  System.out.println(eval.toSummaryString("\nResults\n======\n", false));
  
  System.out.println();
  </code></pre>
  
  <p>Arff data file consist of 2973 instances and each instance has 27 attributes. </p>
  
  <p>My question is, how can I find out weights for instance attributes. <strong>I need to investigate which attributes are the most useful in process of classification.</strong>  </p>
  
  <p>I'm beginner at field of machine learning, so simple language and sample code would be appreciated.</p>
  
  <p>Thanks in advance for any help.</p>