Waikato / meka

Multi-label classifiers and evaluation procedures using the Weka machine learning framework.
http://waikato.github.io/meka/
GNU General Public License v3.0
200 stars 76 forks source link

Error occurs when tring to use SMO -C for parameter tuning #63

Closed acadTags closed 4 years ago

acadTags commented 4 years ago

In the meka wrapper, I tried to run HOMER or BR with SVM and to tune the value of -C in SVM.

However, error occurs at the prediction stage, is it because the -C has been occupied by meka? When -C 1.0 is removed, the program works fine.

The prediction command is below

java -cp "C:\Users\xxx\scikit_ml_learn_data\meka\meka-release-1.9.2\lib\*" meka.classifiers.multilabel.BR -W weka.classifiers.functions.SMO -C 1.0 -t "C:\Users\xxx\AppData\Local\Temp\tmp8k72pc2i.arff" -T "C:\Users\xxx\AppData\Local\Temp\tmppka5mk9h.arff" -verbosity 5 -l "C:\Users\xxx\AppData\Local\Temp\tmpzp4xpsjt"

fracpete commented 4 years ago

The option handling (inherited from Weka) can be sometimes a bit confusing. The "-W" option usually only takes a single argument, which is the scheme name. Options for that scheme have to be supplied after the "--" meta-option, which has to be placed at the end of the command. Your command would therefore look like this: java -cp "C:\Users\xxx\scikit_ml_learn_data\meka\meka-release-1.9.2\lib*" meka.classifiers.multilabel.BR -W weka.classifiers.functions.SMO -t "C:\Users\xxx\AppData\Local\Temp\tmp8k72pc2i.arff" -T "C:\Users\xxx\AppData\Local\Temp\tmppka5mk9h.arff" -verbosity 5 -l "C:\Users\xxx\AppData\Local\Temp\tmpzp4xpsjt" -- -C 1.0

I'd recommend to use the Meka Explorer to configure your scheme, copy/paste the commandline (via right-click) and then just add the java call at the start and all other general options (datasets, verbosity, ...) right after the first classname.

Please use the Meka mailing list for asking questions: https://sourceforge.net/projects/meka/lists/meka-list

acadTags commented 4 years ago

The option handling (inherited from Weka) can be sometimes a bit confusing. The "-W" option usually only takes a single argument, which is the scheme name. Options for that scheme have to be supplied after the "--" meta-option, which has to be placed at the end of the command. Your command would therefore look like this: java -cp "C:\Users\xxx\scikit_ml_learn_data\meka\meka-release-1.9.2\lib*" meka.classifiers.multilabel.BR -W weka.classifiers.functions.SMO -t "C:\Users\xxx\AppData\Local\Temp\tmp8k72pc2i.arff" -T "C:\Users\xxx\AppData\Local\Temp\tmppka5mk9h.arff" -verbosity 5 -l "C:\Users\xxx\AppData\Local\Temp\tmpzp4xpsjt" -- -C 1.0

I'd recommend to use the Meka Explorer to configure your scheme, copy/paste the commandline (via right-click) and then just add the java call at the start and all other general options (datasets, verbosity, ...) right after the first classname.

Please use the Meka mailing list for asking questions: https://sourceforge.net/projects/meka/lists/meka-list

Great! This solved my problem, thanks!