O'Reilly logo

Learning Apache Mahout by Chandramani Tiwary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A Mahout command-line example

Now, we will discuss how to cluster objects using the Mahout command line. We start with getting the data first.

Getting the data

We will use the seed dataset from our favorite UCI repository for clustering examples. The dataset is available at https://archive.ics.uci.edu/ml/datasets/seeds.

To download the data, we can execute the following command:

wget https://archive.ics.uci.edu/ml/machine-learning-databases/00236/seeds_dataset.txt

We also have the data downloaded in data/chapter7 in our code base.

Data description

The seed dataset consists of 8 attributes as follows:

Column

Data type

Area (A)

Continuous

Perimeter (P)

Continuous

Compactness (C = 4*pi*A/P^2)

Continuous

Length of kernel

Continuous

Width of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required