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
2014年3月25日 星期二
2014年2月26日 星期三
Using Sparse ARFF files as the input of weka association rule
the format is as below test.arff
@relation test
@attribute a {y}
@attribute b {y}
@attribute c {y}
@attribute d {y}
@attribute e {y}
@attribute f {y}
@attribute g {y}
@attribute h {y}
@data
{1 y,3 y,5 y}
{2 y,3 y,5 y}
{2 y,6 y}
{1 y,3 y,5 y}
{3 y,5 y,7 y}
{1 y,2 y,3 y}
{2 y,4 y,5 y}
{2 y,3 y,5 y}
{3 y,5 y,7 y}
{1 y,2 y}
{1 y,5 y,7 y}
@relation test
@attribute a {y}
@attribute b {y}
@attribute c {y}
@attribute d {y}
@attribute e {y}
@attribute f {y}
@attribute g {y}
@attribute h {y}
@data
{1 y,3 y,5 y}
{2 y,3 y,5 y}
{2 y,6 y}
{1 y,3 y,5 y}
{3 y,5 y,7 y}
{1 y,2 y,3 y}
{2 y,4 y,5 y}
{2 y,3 y,5 y}
{3 y,5 y,7 y}
{1 y,2 y}
{1 y,5 y,7 y}
2013年5月6日 星期一
Weka FP Growth dataset
Weka FPGrowth needs Binary attributes, arff form likes this:
@relation FPGrowth dataset
@attribute a {1,0}
@attribute b {1,0}
@attribute c {1,0}
@data
0,0,0
0,0,1
0,1,0
0,1,1
1,0,0
1,0,1
1,1,0
1,1,1
@relation FPGrowth dataset
@attribute a {1,0}
@attribute b {1,0}
@attribute c {1,0}
@data
0,0,0
0,0,1
0,1,0
0,1,1
1,0,0
1,0,1
1,1,0
1,1,1
訂閱:
文章 (Atom)