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 ... |
Get Learning Apache Mahout 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.