Step 1: download LibSVM
https://github.com/cjlin1/libsvm
Step2: unzip the zip file libsvm-master.zip,
and then find the libsvm.jar in /where you unzip/libsvm-master/java
Step3: copy libsvm.jar into your Weka folder
ex: in my path is D:\Weka3-6\
Step4: set up the CLASSPATH in your environment or in RunWeka.ini
in your environment
in Windows:
In the Control Panel click on System (or right click on My Computer and select Properties) and then go to the Advanced tab. There you will find a button called Environment Variables, click it.
Enter the "CLASSPATH" for the variable and add this value "D:\Weka3-6\libsvm.jar" after ";" if you have other values in CLASSPATH
DOS command:
set CLASSPATH=%CLASSPATH%;D:\Weka3-6\libsvm.jar;
in Linux:
export CLASSPATH=$CLASSPATH: where your libsvm.jar
if i put it in /home/user
export CLASSPATH=$CLASSPATH:/home/user/libsvm.jar
in RunWeka.ini:
in Windows:
open RunWeka.ini with any text editor, you can find
cp=%CLASSPATH%; in the last line
add your path of libsvm.jar after ";"
cp=%CLASSPATH%;D:\Weka3-6\libsvm.jar
or
cp=%CLASSPATH%;./libsvm.jar
沒有留言:
張貼留言