Book Image

Clojure for Data Science

By : Henry Garner
Book Image

Clojure for Data Science

By: Henry Garner

Overview of this book

Table of Contents (18 chapters)
Clojure for Data Science
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Large-scale clustering with Mahout


Mahout (http://mahout.apache.org/) is a machine learning library intended for use in distributed computing environments. Version 0.9 of the library targets Hadoop and is the version we'll be using here.

Note

At the time of writing, Mahout 0.10 has just been released and also targets Spark. Spark is an alternative distributed computing framework that we'll be introducing in the next chapter.

We saw in the previous chapter that one of Hadoop's abstractions is the sequence file: a binary representation of Java keys and values. Many of Mahout's algorithms expect to operate on sequence files, and we'll need to create one as input to Mahout's k-means algorithm. Mahout's k-means algorithm also expects to receive its input as a vector, represented by one of Mahout's vector types.

Although Mahout contains classes and utility programs that will extract vectors from text, we'll use this as an opportunity to demonstrate how to use Parkour and Mahout together. Not only...