Using MOA command line

308 views
Skip to first unread message

D Razz

unread,
Dec 28, 2015, 2:43:18 PM12/28/15
to MOA users
Hi, 

I am trying to run  multilabel/ MEKA classifier through MOA in command line in window. I use this command (I want to predict all last 6 classes (attributes)) :


java -cp moa.jar;meka.jar;weka.jar -javaagent:sizeofag.jar moa.DoTask "EvaluateModel -m (LearnModel -l (multilabel.MEKAClassifier -l (meka.classifiers.multilabel.incremental.BRUpdateable)) -s (ArffFileStream -f C:\emotions-train.arff -c 6)) -s (ArffFileStream -f C:\emotions-test.arff -c 6)  -o C:\results.txt"

 I am however having some trouble, can anyone help me please with some ideas on how to tackle these problems? Would be much appreciated!

java.lang.Exception: Problem with options to 'EvaluateModel'.

Valid options for EvaluateModel:
-m model (default: LearnModel)
Classifier to evaluate.
-s stream (default: generators.RandomTreeGenerator)
Stream to evaluate on.
-e evaluator (default: BasicClassificationPerformanceEvaluator)
Classification performance evaluation method.
-i maxInstances (default: 1000000)
Maximum number of instances to test.
-o outputPredictionFile
File to append output predictions to.
-O taskResultFile
File to save the final result of the task to.

        at moa.options.ClassOption.cliStringToObject(ClassOption.java:156)
        at moa.DoTask.main(DoTask.java:130)
Caused by: java.lang.IllegalArgumentException: Problems with option: model
        at moa.options.ClassOption.setValueViaCLIString(ClassOption.java:69)
        at moa.options.Options.setViaCLIString(Options.java:145)
        at moa.options.ClassOption.cliStringToObject(ClassOption.java:154)
        ... 1 more
Caused by: java.lang.Exception: Problem with options to 'LearnModel'.

Valid options for LearnModel:
-l learner (default: bayes.NaiveBayes)
Classifier to train.
-s stream (default: generators.RandomTreeGenerator)
Stream to learn from.
-m maxInstances (default: 10000000)
Maximum number of instances to train on per pass over the data.
-p numPasses (default: 1)
The number of passes to do over the data.
-q memCheckFrequency (default: 100000)
How many instances between memory bound checks.
-O taskResultFile
File to save the final result of the task to.

        at moa.options.ClassOption.cliStringToObject(ClassOption.java:156)
        at moa.options.ClassOption.setValueViaCLIString(ClassOption.java:67)
        ... 3 more
Caused by: java.lang.IllegalArgumentException: Problems with option: learner
        at moa.options.ClassOption.setValueViaCLIString(ClassOption.java:69)
        at moa.options.Options.setViaCLIString(Options.java:145)
        at moa.options.ClassOption.cliStringToObject(ClassOption.java:154)
        ... 4 more
Caused by: java.lang.Exception: Problem creating instance of class: multilabel.
EKAClassifier
        at moa.options.ClassOption.cliStringToObject(ClassOption.java:136)
        at moa.options.ClassOption.setValueViaCLIString(ClassOption.java:67)
        ... 6 more
Caused by: java.lang.IllegalArgumentException: Problems with option: baseLearne

        at moa.options.WEKAClassOption.setValueViaCLIString(WEKAClassOption.jav
:80)
        at moa.options.AbstractOption.resetToDefault(AbstractOption.java:98)
        at moa.options.AbstractClassOption.<init>(AbstractClassOption.java:93)
        at moa.options.AbstractClassOption.<init>(AbstractClassOption.java:72)
        at moa.options.WEKAClassOption.<init>(WEKAClassOption.java:48)
        at moa.classifiers.meta.WEKAClassifier.<init>(WEKAClassifier.java:49)
        at moa.classifiers.multilabel.MEKAClassifier.<init>(MEKAClassifier.java
37)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruc
orAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Delegating
onstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at java.lang.Class.newInstance(Class.java:379)
        at moa.options.ClassOption.cliStringToObject(ClassOption.java:134)
        ... 7 more
Caused by: java.lang.Exception: Class not found: weka.classifiers.bayes.NaiveBa
esUpdateable
        at moa.options.WEKAClassOption.cliStringToObject(WEKAClassOption.java:1
7)
        at moa.options.WEKAClassOption.setValueViaCLIString(WEKAClassOption.jav
:78)
        ... 19 more
thanks
D Razz

Albert Bifet

unread,
Apr 27, 2016, 4:04:35 AM4/27/16
to MOA users
Caused by: java.lang.Exception: Class not found:
weka.classifiers.bayes.NaiveBayesUpdateable

It seems that this class is not found in the java classpath.

Cheers, Albert
> --
> You received this message because you are subscribed to the Google Groups
> "MOA users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to moa-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages