Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using mahout and hadoop

I am a newbie trying to understand how will mahout and hadoop be used for collaborative filtering. I m having single node cassandra setup. I want to fetch data from cassandra

Where can I find clear installation steps for hadoop first and then mahout to work with cassandra?

like image 306
deggi Avatar asked Jan 12 '11 10:01

deggi


People also ask

How does Mahout work with Hadoop?

Mahout operates in addition to Hadoop, which allows you to apply the concept of machine learning via a selection of Mahout algorithms to distributed computing via Hadoop. Mahout's core algorithms include recommendation mining, clustering, classification, and frequent item-set mining.

Is Mahout part of Hadoop?

Apache Mahout is a powerful, scalable machine-learning library that runs on top of Hadoop MapReduce.

How does Apache Mahout work?

Apache Mahout is a highly scalable machine learning library that enables developers to use optimized algorithms. Mahout implements popular machine learning techniques such as recommendation, classification, and clustering. Therefore, it is prudent to have a brief section on machine learning before we move further.


1 Answers

(I think this is the same question you just asked on [email protected]? Copying my answer.)

You may not need Hadoop at all, and if you don't, I'd suggest you not use it for simplicity. It's "necessary evil" to scale past a certain point.

You can have data on Cassandra but you will want to be able to read it into memory. If you can dump as a file, you can use FileDataModel. Or, you can emulate the code in FileDataModel to create one based on Cassandra.

Then, your two needs are easily answered:

  1. This is not even a recommendation problem. Just pick an implementation of UserSimilarity, and use it to compare a user to all others, and pick the ones with highest similarity. (Wrapping with CachingUserSimilarity will help a lot.)

  2. This is just a recommender problem. Use a GenericUserBasedRecommender with your UserSimilarity and DataModel and you're done.

It of course can get much more complex than this, but this is a fine start point.

If later you use Hadoop, yes you have to set up Hadoop according to its instructions. There is no Mahout "setup". For recommenders, you would look at one of the RecommenderJob classes which invokes the necessary jobs on your Hadoop cluster. You would run it with the "hadoop" command -- again, this is where you'd need to just understand Hadoop.

The book Mahout in Action writes up most of the Mahout Hadoop jobs in some detail.

like image 175
Sean Owen Avatar answered Oct 20 '22 04:10

Sean Owen