Getting Apache Mahout

Mahout was introduced in Chapter 2, Java Tools and Libraries for Machine Learning, as a scalable machine learning library. It provides a rich set of components with which you can construct a customized recommendation system from a selection of algorithms. The creators of Mahout say it is designed to be enterprise-ready; it's designed for performance, scalability, and flexibility.

Mahout can be configured to run in two flavors: with or without Hadoop for a single machine and distributed processing, correspondingly. We will focus on configuring Mahout without Hadoop. For more advanced configurations and further uses of Mahout, I would recommend two recent books: Learning Apache Mahout (Tiwary, 2015) and Learning Apache Mahout Classification (Gupta, 2015).

As Apache Mahout's build and release system is based on Maven, we will need to learn how to install it. We will look at the most convenient approach using Eclipse with Maven plugin.

Configuring Mahout in Eclipse with the Maven plugin

We will need a recent version of Eclipse, which can be downloaded from its home page. We use Eclipse Luna in this book. Open Eclipse and start a new Maven Project with default settings as shown in the following screenshot:

Configuring Mahout in Eclipse with the Maven plugin

The New Maven project screen will appear as shown in the following image:

Configuring Mahout in Eclipse with the Maven plugin

Now, we need to tell the project to add Mahout jar and its dependencies to the project. Locate the pom.xml file and open it with the text editor (left click on Open With | Text Editor), as shown in the following screenshot:

Configuring Mahout in Eclipse with the Maven plugin

Locate the line starting with <dependencies> and add the following code in the next line:

<dependency>
  <groupId>org.apache.mahout</groupId>
  <artifactId>mahout-mr</artifactId>
  <version>0.10.0</version>
</dependency>

That's it, Mahout is added and we are ready to begin now.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.137.7