Search code examples
weka

Weka numeric class multilayer perceptron


i was using the weka interface to do some classification using the MultilayerPerceptron.

My class is numeric and i am trying now to do the classification from command line... so i can leave the computer doing the simulation using a lot of files.

I was trying to use the

java -classpath weka.jar weka.classifiers.meta.FilteredClassifier -t ~/Desktop/arff/3x3-noextra.arff -W weka.classifiers.functions.MultilayerPerceptron -- -L 0.4 -M 0.5 -N 500 -V 0 -S 0 -E 20 -H a

Command as a test, but because my class is numeric i get the:

weka.core.UnsupportedAttributeTypeException: weka.filters.supervised.attribute.Discretize: Cannot handle numeric class!
    at weka.core.Capabilities.test(Capabilities.java:954)
    at weka.core.Capabilities.test(Capabilities.java:1110)
    at weka.core.Capabilities.test(Capabilities.java:1023)
    at weka.core.Capabilities.testWithFail(Capabilities.java:1302)
    at weka.filters.Filter.testInputFormat(Filter.java:434)
    at weka.filters.Filter.setInputFormat(Filter.java:452)
    at weka.filters.supervised.attribute.Discretize.setInputFormat(Discretize.java:286)
    at weka.classifiers.meta.FilteredClassifier.buildClassifier(FilteredClassifier.java:389)
    at weka.classifiers.Evaluation.evaluateModel(Evaluation.java:1149)
    at weka.classifiers.Classifier.runClassifier(Classifier.java:315)
    at weka.classifiers.meta.FilteredClassifier.main(FilteredClassifier.java:478)

Error,

On the interface it is automatic, i dont need to handle nothing, how can i do that using the command line?


Solution

  • I did some stupid things, i just needed the multilayerperceptron.

    I solved that with:

    java -classpath weka.jar  weka.classifiers.functions.MultilayerPerceptron  -L 0.3 -M 0.5 -N 500 -V 0 -S 0 -E 20 -H a
    

    Just calling the multilayer.