Skip to content

Content based and collaborative filtering based recommendation and personalization engine implementation on Hadoop and Storm

Notifications You must be signed in to change notification settings

KarthikSonti/sifarish

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Sifarish is a suite of solutions for recommendation personalization implementaed on Hadoop and Storm. Various algorithms, including feature similarity based recommendation and collaborative filtering based recommendation using social rating data are available

Philosophy

  • Providing complete business soltion, not just bunch of machine learning algorithms
  • Simple to use
  • Input output in CSV format
  • Metadata defined in simple JSON file
  • Extremely configurable with tons of configuration knobs

Blogs

The following blogs of mine are good source of details of sifarish. These are the only source of detail documentation

Content Similarity Based Recommendation

In the absence of social rating data, the only options is a feature similarity based recommendation. Similarity is calculated based on distance between entities in a multi dimensional feature space. Some examples are - recommending jobs based on user's resume - recommending products based on user profile. These solutions are known as content based recommendation, because it's based innate features of some entity.

There are two different solutions as follows

  1. Similarity between entities of different types (e.g. user profile and product)
  2. Similarity between entities of same type (e.g. product)

Attribute meta data is defined in a json file. Both entities need not have the same set of attributes. Mapping between attributes values from one entity to the other can be defined in the config file.

The data type supported are numerical (integer), categorical, text. The distance algorithms can be chosed to be euclidian, manhattan or minkowski. The default algorithm is euclidian. The distancs between different atrributes of different types are combined to find distance between two entity instances. Different weights can be assigned to the attributes to control the relative importance of different attributes.

Social Interaction Data Based Recommendation

These solutions are based user behavior data with respect to some product or service. these algorithms are also known as collaborative filtering.

User behavior data is defined in terms of some explicit rating by user or it's derived from user behavior in the site. The essential input to all these algorithms is a matrix of user and items. The value for a cell could be the ratingas an integer. It could also be boolean, if the user's interest in an item is expressed as a boolean

Cold Starting Recommenders

These solutions are used when enough social data is not avaialable.

  1. If data contains text attributes, use TextAnalyzer MR to convert text to token stream using lucene
  2. Find similar items based on user profile. Use DiffTypeSimilarity MR
  3. Use TopMatches MR to find top n matches for a profile

Warm Starting Recommenders

When limited amount of user behavior data is available, these solutuions are appropriate

  1. If data contains text attributes, use TextAnalyzer MR to convert text to token stream using lucene
  2. Find similar items by pairing items with one another using SameTypeSimilarity MR
  3. Use TopMatches MR to find top n matches for a product

Recommenders with Fully engaged Users

When significant of user behavior data is available, these soltions can be used. In the order of complexity, the choices are as follows. They are all based on social data

There two phases for collaborative filetering based recommendation using social data

  1. Find correlation between items 2. Predict rating based on items alreadyv rated and result of 1

The process involved running multiple map reduce jobs. Some of them are optional. Please refer to the tutorial document tutorial.txt in the resource directory

Real Time Recommendation

Recommendations can be made real time based on user's current behavior in a pre defined time window. The solution is based on Storm, although Hadoop gets used to compute item correlation matrix from historical user behavior data.

Complex Attributes

There is suppoort for structured fields e.g., Location, Time Window, Categorized Item, Product etc. These provide contextual dimensions to recommendation. They are particularly relevant for recommendation in the mobile space

Novelty

Novelty for an item can be computed at individual user level or the whole user community as a whole. Novelty is blended into the final recommendation list by taking weighted average of predicted rating and novelty

Diversilty

Based on recent work in the academic world, I am working on implementing some algorithms to introduce
diversity in recommendation. Unlike novelty, diversity is group wise property. Diversity can be defined either in terms item dissimilarity in a collaborative filtering sense or structural and content sense

Facted Match

For content based recommendation, faceted match is supported as faceted search in Solr. Faceted fields are specified through a configuration parameter

Dithering

Dithering effectively handles the problem users usually not browsing the first few items in a list. The dithering process shuffles the list little bit, every time recommended items are presented to the user.

Getting started

Please use the tutorial.txt file in the resource directory for batch mode recommendation processing. For real time recommendation please use the tutorial document there is a separate tutorial document realtime_recommendation_tutorial.txt

Help

Please feel free to email me at pkghosh99@gmail.com

About

Content based and collaborative filtering based recommendation and personalization engine implementation on Hadoop and Storm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published