# Make use of relationships on recommendation systems

I have a data set of user rating for movie as

user_name, product_name, user_rating


and I am using this data to recommend new movie to user (collaborative filtering).

I also have another data set which show relationships between user like

user_1, CO_WORKER, user_2
user_1, FATHER_OF, user_3
user_3, FRIEND_OF, user_4 etc


Now what are the ways to include 'relationship data' along with 'ratings data' to produce better recommendations ?

example : user_1 might like the movies which user_2 likes since they are co_workers

## 3 Answers

Go for network analysis! make a network in which the links are relations and try to make network analysis to get your answer. Tones of tutorials on the web. You can have a look at GraphLab Create as a start.

There are a number of ways to make use of this information, including various graph-based methods of recommendation.

Collaborative Filtering using Weighted BiPartite Graph Projection
A Recommendation System for Yelp

It's also common to use multiple approaches to build a hybrid recommendation system.

GraphLab is a good choice.

Check out NetworkX. You could make this really easy on yourself by eliminating the father of/friend of/etc. distinctions and just treat every relationship as fundamentally the same. Then its as simple as building a graph that tracks the connections between your users. After that you could limit collaborative filtering to people in this person's close circle of friends.

You could also make distinct Friend/Family/Coworker implementations, but unless you have a LOT of data (and a lot of Family members) collaborative filtering could be a little disappointing.