How to Set libsvm

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.