Weka Accessing the database

Source: Internet
Author: User

Tag:weka    configuration     database    

One, configuration file
1, set Classpath,

2. Use UTF-8 data set or file (can be omitted)
To modify the Runweka.ini file under the installation directory, proceed as follows:
Step 1: Open the Runweka.ini file with any text editor
Step 2: Find fileencoding=cp1252 in line 32 and change Cp1252 to Utf-8
3. Configuring the Databaseutils.props File
Weka will only look for a configuration file named Databaseutils.props, if the user wants to use the rest of the configuration file (such as DatabaseUtils.props.mysql) as a template, on this basis to make changes, it is important to remember to change the name first.
(1) To Weka installation directory, find Weka.jar, unzip, open the Databaseutils.props file.
(2) Will Jdbcdriver=rmijdbc.rjdriver,jdbc.idbdriver,org.gjt.mm.mysql.driver,com.mcko. This sentence is replaced by a jdbcdriver=com.mysql.jdbc.driver
Replace JDBCURL=JDBC:IDB=EXPERIMENTS.PRP with Jdbcurl=jdbc:mysql://localhost:3306/weka (database name)
(3) Re-compress, replace the original Weka.jar
4. Restart
Click on the first button explorer on the right, and clicking the Third button in Explorer open DB,

Click the first button (similar to a person's icon) to the right of the URL input box.

Click OK, and then click the second button (like a bird icon) to the right of the URL input box to display

To bulk import the Arff files into the MySQL database, see the following steps:
http://blog.csdn.net/leegh1992/article/details/45640777
In query, enter the inquiry statement: SELECT * from Iris;

Click Execute, such as:

At this point, the data has been successfully queried from the database.

Weka Accessing the database

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.