Machine Learning in Java
上QQ阅读APP看书,第一时间看更新

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 tab, and select Add External JARs.
  3. Navigate to extract the Weka archive and select the weka.jar file.

That's it; we are ready to implement the basic machine learning techniques!