Creating an item-based recommendation engine using Mahout
In this recipe, we are going to take a look at how to use Mahout to generate item-based recommendations. Recommendation engine is one of the most seen use cases. A recommendation engine generates recommendations based on the input data provided to it. In this recipe, we are going to take a look at how to generate recommendations based on user preferences for certain items.
Getting ready
To perform this recipe, you should have a running Hadoop cluster as well as the latest version of Mahout installed on it.
How to do it...
Mahout provides built-in support for item-based recommendations. In order to execute a program using Mahout, we first need to prepare the input data and store it in a certain folder. The input data needs to be in a specified format (userId
, itemId
, and preference). Here, userId
is the unique user identifier, itemId
, is the unique item identifier, while the preference can be a rating given by a user to a specific item...