ݺߣ

ݺߣShare a Scribd company logo
WEKA
Adding weka.jar to CLASSPATH
on Windows 8.1
Three simple phases
1. Locate WEKA installation directory
2. Create/edit the CLASSPATH environment
variable
3. Execute the weka.gui.GUIChooser main class
Locate WEKA installation directory
In this case the directory is
“C:devWeka-3-6”.
The file name required is:
“weka.jar”.
Assumptions for phase 2
The following pictures are taken on Windows 8.1 with Italian interface, so
consider that:
1) @1st step use the search tool by moving the pointer on the right side of
the screen and type “environment variables” and open the editor for
them
2) @2nd step there are two possibilities for the CLASSPATH env. var.:
a) it does not exist and then it must be created; click on “New”
b) it already exists and then it must be edited; click on “Edit” and add the WEKA path
Create/edit the CLASSPATH environment variable
1st step
2nd step
Create/edit the CLASSPATH environment variable
The value must include “weka.jar”
NOTE: the pictures shows case a, where no other paths are in the CLASSPATH
because it has been created on purpose.
3rd step
Finale: execute weka.jar main class
The weka.jar archive has the following main class:
weka.gui.GUIChooser
The following command will launch the WEKA GUI:
java weka.gui.GUIChooser
Launching WEKA tools
It is possible to call WEKA tools externally just specifying their package and
name, for example:
java weka.filters.unsupervised.attribute.PrincipalComponents
-i C:devWeka-3-6datairis.arff -o iris-PC.arff -c last

More Related Content

Using Weka from Windows prompt

  • 1. WEKA Adding weka.jar to CLASSPATH on Windows 8.1
  • 2. Three simple phases 1. Locate WEKA installation directory 2. Create/edit the CLASSPATH environment variable 3. Execute the weka.gui.GUIChooser main class
  • 3. Locate WEKA installation directory In this case the directory is “C:devWeka-3-6”. The file name required is: “weka.jar”.
  • 4. Assumptions for phase 2 The following pictures are taken on Windows 8.1 with Italian interface, so consider that: 1) @1st step use the search tool by moving the pointer on the right side of the screen and type “environment variables” and open the editor for them 2) @2nd step there are two possibilities for the CLASSPATH env. var.: a) it does not exist and then it must be created; click on “New” b) it already exists and then it must be edited; click on “Edit” and add the WEKA path
  • 5. Create/edit the CLASSPATH environment variable 1st step 2nd step
  • 6. Create/edit the CLASSPATH environment variable The value must include “weka.jar” NOTE: the pictures shows case a, where no other paths are in the CLASSPATH because it has been created on purpose. 3rd step
  • 7. Finale: execute weka.jar main class The weka.jar archive has the following main class: weka.gui.GUIChooser The following command will launch the WEKA GUI: java weka.gui.GUIChooser
  • 8. Launching WEKA tools It is possible to call WEKA tools externally just specifying their package and name, for example: java weka.filters.unsupervised.attribute.PrincipalComponents -i C:devWeka-3-6datairis.arff -o iris-PC.arff -c last