title: Using InputMappedClassifier From Command Line
body: <p>I'm trying to run a classifier with the InputMappedClassifier, since I know the test arff is missing some attributes in the training arff. However, when I run:</p>
  
  <pre><code>java -cp ./weka.jar weka.classifiers.misc.InputMappedClassifier -t aa/lang-train.arff \
  -T aa/lang-test.arff -W weka.classifiers.trees.J48 -classifications \ 
  weka.classifiers.evaluation.output.prediction.PlainText
  </code></pre>
  
  <p>It generates the exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Invalid class index: 2466
      at weka.core.Instances.setClassIndex(Instances.java:1293)
      at weka.core.converters.ConverterUtils$DataSource.getStructure(ConverterUtils.java:346)
      at weka.classifiers.evaluation.output.prediction.AbstractOutput.printClassifications(AbstractOutput.java:625)
      at weka.classifiers.evaluation.output.prediction.AbstractOutput.print(AbstractOutput.java:702)
      at weka.classifiers.evaluation.Evaluation.evaluateModel(Evaluation.java:1572)
      at weka.classifiers.Evaluation.evaluateModel(Evaluation.java:649)
      at weka.classifiers.AbstractClassifier.runClassifier(AbstractClassifier.java:297)
      at weka.classifiers.misc.InputMappedClassifier.main(InputMappedClassifier.java:943)
  </code></pre>
  
  <p>If I run it without <code>-classifications</code>, it works. How can I get the classifications?</p>