1. Use libsvm for GUI in WEKA
1. In http://www.cs.iastate.edu /~ Yasser/wlsvm/download the wlsvm.zip compressed package, decompress the package
The libsvm. jar and wlsvm. Jar files in the \ Lib folder are placed in the WEKA installation directory.
2. Open the runweka. ini file in the WEKA installation directory, and set cmd_default = javaw-xmx # maxheap #-classpath "% classpath %; # WEKA. Jar #" # mainclass #
Change
Export _default = javaw-xmx # maxheap #-classpath "% classpath %; # WEKA. Jar #; wlsvm. jar; libsvm. Jar" # mainclass #
3. Run runweka. Bat directly, and then open explorer.Find libsvm in Er-function, like using other classesIfier can use it. In this way, libsvm is successfully integrated into WEKA.
Of course, you can also use"
Package conceptdrift. Detection. method;
Import WEKA. classifiers. functions. libsvm;
Import WEKA. Core. instances;
Public class uselibsvm {
Public static void main (string [] Options) throws exception
{
Instances date = read_copy_arff.getarfffile ("data \ covtype. ARFF ");
Libsvm = new libsvm ();
Libsvm. buildclassifier (date );
Libsvm. classifyinstance (date. instance (0 ));
}
}
Ii. Use the libsvm package separately
Import the package in the project and use it like WEKA.