Archive

Archive for the ‘Weka’ Category

Manual Eclipse weka project creation

July 18, 2011 Leave a comment
  1. Setting up your Eclipse project.
    1. Run Eclipse and choose File, New, Project, Java Project.
    2. Name it whatever you want and set the different options according to your own preferences. (For example, I prefer to keep my source files in a sub directory src and the compiled bytecode class files in a sub directory build.)
    3. Under the Libraries tab, choose Add External Jars and add weka.jar from the directory where you installed WEKA.
    4. Click finish. This will create a new project in the Package Explorer.
  2. Setup WEKA source and Javadoc pointers. (Optional)
    1. Expand your project in the Package Explorer, right-click on weka.jar, and choose Properties....
    2. Under Javadoc location, choose javadoc url and Browse for $WEKA$/doc, where $WEKA$ is the directory where you installed WEKA.
    3. Under Java Source Attachment, choose External File... and select $WEKA$/weka-src.jar.

Here are some examples for using weka inside your java code.

Another simple way when you want to add the jar file into your current project:
Setup and Configuration
1) Downloaded and Weka.jar extracted into a folder.
2) Create a new project
3) Navigate to “Build Path” -> “Add External Archives” and choose your weka-jar file

Other Links:
Creating a weka class
Some sample Codes using weka
– Nice Tutorial for Eclipse (Add the src and javadoc in Eclipse)

Categories: Java, Weka