Before you start

Before you start, download the latest stable version of Weka (Weka 3.8 at the time of writing) from http://www.cs.waikato.ac.nz/ml/weka/downloading.html.

There are multiple download options available. You'll want to use Weka as a library in your source code, so make sure that you skip the self-extracting executables and download the ZIP archive, as shown in the following screenshot. Unzip the archive and locate weka.jar within the extracted archive:

We'll use the Eclipse IDE to show examples; follow these steps:

  1. Start a new Java project.
  2. Right-click on the project properties, select Java Build Path, click on the Libraries ...

Get Machine Learning in Java - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.