Mahout in Action Review
Join the DZone community and get the full member experience.Join For Free
you know your (technical)
is (almost) grown up when the book on the project finally comes out. such is the case for apache mahout, thanks to
mahout in action
so, before i start into my review, let me first say congratulations to
sean, robin, ted, ellen and manning for producing such an excellent
product. the simplest praise i can give it is to put it on the same
level as one of the best intro to technology books i know:
lucene in action
. in other words, it sets the standard by which all other mahout books will be judged.
as for the actual book, it is broken down into 3 sections, which i like to call the “three c’s”:
- collaborative filtering
so, without further ado, let’s take a deeper look at the book in this context of the three c’s.
collaborative filtering is by far one of the most popular parts of mahout, being used in places like amazon and foursquare and this section of the book, via 5 chapters, walks you nicely through both the concepts and the practical aspects of collaborative filtering. chapter 2 starts by getting you up and running using the grouplens dataset for movie recommendations. for those unfamiliar with collaborative filtering, this makes for a nice entrance into the subject with data everyone can relate to easily. chapter 3 then discusses how to best model your data, while chapter 4 looks at the mechanics of actually generating recommendations from the data. chapters 5 and 6 then discuss the ins and outs of taking a recommendation engine into production, including details on how to scale it out using apache hadoop. i found the explanation of the hadoop based co-occurrence process (via recommenderjob) especially useful, as i recently just committed mahout-798 , which uses it to build an example recommendation system based off of user interaction with email. in fact, i relied heavily on all of the concepts in this part of the book, as i first had to extract and clean the data, then properly model it before finally running the recommendation task on ec2.
when i first got access to the meap for this book (quite some time
ago), i did not have a lot of background in collaborative filtering and
these chapters really helped fill in the practical details for me as
well as provided a good foundation for the theoretical aspects behind
collab. filtering. i think this will serve others well who are looking
to get started with collaborative filtering as well.
similar to collaborative filtering, the clustering section starts off by introducing the basic concepts and then quickly gets you up and running with an example clustering run. chapter 8 then gets into how best to do feature selection for clustering. feature selection is often one of the keys to successful clustering, so be sure to make sure you have a good grasp on the contents of the chapter before moving ahead into chapter 9, which gets into some of mahout’s clustering algorithms. that chapter primarily focuses on k-means and dirichlet, but also covers a few others. note, mahout actually has a few other algorithms for clustering then the ones described, like spectral, canopy, meanshift and minhash. of course, some of these were added later in the book cycle, so it is hard to complain that they weren’t incorporated. chapter 10 then covers, in my experience, one of the harder aspects of clustering, namely how to evaluate the results. this chapter is a little bit thin, but it seems the overall field is the same, so this is not a put down on the chapter! there simply isn’t a lot of great tools available for evaluating clustering.
classification is very popular these days both in search and beyond, so it is great to see this set of chapters covering the topic so well in practical, accessible terms. as you would expect, the first chapter (13) gets you up and running as well as introduces the concepts of classification. this chapter has a great explanation of how classification works and a typical workflow for building a classifier.
chapter 14 then delves into the details of actually training a classifier using mahout’s stochastic gradient descent algorithm as well as it’s bayesian classifier.
the next chapter then takes a look at how best to evaluate a classifier as well as some insight into what happens when a classifier goes bad. be sure to check this out, as you will no doubt run into many of the issues covered. as an aside, i couldn’t help thinking of the classic “far side” cartoon to the right upon reading that section heading.
the penultimate classification chapter digs into the practical
aspects of deploying a classifier in production, including details on
working through your scale and speed requirements. it finishes off with
an example apache thrift based server which some may find as a useful
starting point for their applications. finally, mahout in action
finishes off with a case study of how
shop it to me
uses a mahout classifier to provide recommendations of offers to
customers. as with any technical book, it is great to have some
concrete discussion of how this stuff functions in the wild.
what’s missing (i.e. when’s the 2nd edition coming out?)
mahout has a number of other interesting things that are in various stages of development like frequent patternset mining, singular value decomposition (feature reduction), evolutionary programming, integration libraries for input/output as well as tools for storing data in cassandra and mongo. since mahout is developing pretty quickly, the lack of this being in the book is no fault of the authors, i’m just putting it up here so that people are aware that mahout has more to offer, even if the three “c’s” are the most popular.
all in all, mahout in action is an excellent introduction to the project. naturally i’m biased, but, pun intended, i highly recommend the book!
Published at DZone with permission of Grant Ingersoll. See the original article here.
Opinions expressed by DZone contributors are their own.