How to use SVM in Weka?

Shaayaan Sayed picture Shaayaan Sayed · Aug 23, 2013 · Viewed 30.1k times · Source

I'm trying to use the svm classifier in weka. When I click on the libsvm classifier and try to train a model based on some provided training data, I get the error

libsvm classes not in CLASSPATH.

The weka website has some information on how to fix this but I'm not sure how to execute them.

http://weka.wikispaces.com/LibSVM

I got the libsvm.jar file from the link provided. I'm not sure which file to put it in.

Answer

jaesanx picture jaesanx · Aug 24, 2013

You have to set your classpath variable so it knows where to find that jar on your local machine.

If you are on windows right-click computer->properties->advanced system settings->environment variables and set it under system variables. Chances are you already have a classpath variable; so just add the path of your jar file to the end.

Reference: http://weka.wikispaces.com/CLASSPATH