Archivo de la etiqueta: moa


How to import MOA into Eclipse

Several people have asked me how to set up MOA (Massive Online Analysis) for developing new classifiers. With this quick tutorial I explain how to load MOA source code in Eclipse for Windows, although it should be very similar in Linux or Mac.

  1. Download and install the latest version of Java SDK (not JRE) if you don’t have it already.
  2. Download the latest version of Eclipse (Classic should be enough). Extract it in any suitable location of your hard drive.
  3. Download and install TortoiseHg (or similar) in order to clone the MOA repository.
  4. Open TortoiseHG and go to File, Clone repository. Set the Source to and the Destination to a folder of your choice (e.g. C:\Users\Manuel\moa-hg). Click on Clone button and you’ll get the code of MOA in your chosen folder.
  5. Open Eclipse and go to Help, Install new software. Set «Work with» to your Eclipse repository (in my case is Juno). Look for m2e plugin and install it (also you can install the slf4j for Maven plugin).
  6. Once Eclipse is restarted, go to File, Import. Select «Existing Maven Projects» option. Set «Root Directory» to your MOA code folder (in my case C:\Users\Manuel\moa-hg). Follow all the steps of the wizard. It is possible that you get this error, but just ignore it. Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:license-maven-plugin:1.1:add-third-party (execution: add-third-party, phase: generate-resources). Eclipse will restart again.
  7. Now you should have three projects folder in the Package Explorer tab: moa, moa-pom and weka-package. For running MOA GUI, look for moa/src/main/java/moa.gui/ file and run it as a Java application.

Please, let me know if you have any problem with this steps or if you know how to solve the error of step 6. Also you can subscribe and participate in MOA development email list.

Saving and loading tasks in MOA

MOA (Massive Online Analysis) is a great opensource and free software for data stream mining. If you are an enthusiastic of machine learning, classification or clustering, you should try it.

You can work with MOA using the GUI, as well as the command line interface via Java. If you are using the graphical interface, you can’t save and load previous tasks. Because of this, i have done some modifications in order to make my work easy.

As you can see in the image, I have add a couple of buttons to the interface:

  • Save Log: create a log file with the strings of the tasks previously executed (you can select one or more from the task list).
  • Set task manually: load a panel in which you can write the command of the task to run (for example, you can copy and paste a task from a previous log file).

The patch for moa.gui.TaskManagerPanel class is available in pastebin.