O'Reilly logo

Apache Mahout Clustering Designs by Ashish Gupta

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

Using Mahout for streaming K-means

After understanding the algorithm side, let's see how we can use the Mahout implementation of Streaming K-means.

Dataset selection

To run the Streaming K-means, we will first select a dataset. The reference paper Fast and Accurate K-Means for Large Datasets, by M.Schindler, A.Wong, and A.Meyerson mentioned two datasets that they used—BigCross and Census1990.

Here, we will use the Census1990 dataset. This dataset can be downloaded from https://archive.ics.uci.edu/ml/machine-learning-databases/census1990-mld/.

This dataset has 2458285 number of instances and 68 number of attributes. Once you have download this data, you will notice that it is in the CSV format, and we cannot use this directly in Mahout.

Converting CSV ...

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