# what techniques can be used to implement Facebook's People You May Know feature?

I'm curious to learn from a technical perspective what techniques can be used to make recommendations for e.g. Facebook's "People You May Know" (what algorithm do they use, etc.)?

One of the things that come to my mind is the number of mutual friends. Other than this, what are the different parameters they use to make suggestions?

-
Any other personal info like: location, schools, interests, mutual sites you like. –  JeffO Jan 15 '12 at 15:24
Read up on the Netflix Algorithm that won the Netflix Prize and you'll see that something like this is not as trivial as it sounds. –  Marvin Pinto Jan 15 '12 at 15:35
Wizards. That's the only explanation I can find. Despite my giving NO information to Facebook, when one person invited me, it listed people I might know who I did know but there's no way on earth the other person could have known. –  pdr Jan 15 '12 at 18:05
Honestly while there are some sophisticated algorithms out there, I'm not sure that Facebook's is one of them. I use the site, and the people it suggests to me, tend to be just random people with one or more friends in common. But since I'm only speculating, I could be completely wrong ! –  Antonio2011a Jan 16 '12 at 3:55

I know this question will bring up a lot of speculation and it may be hard for @brainydexter to choose a correct answer, and maybe there is no one correct answer. Maybe it's a matter of using the statistics that are available to you via the data the app collects. Remember people know each other via their real-life social circles as well as virtual circles.

• # of mutual friends is an excellent starting point. Give it a weight of .2 for 10% of friends are mutual friends, .5 for 30% of friends are mutual, .9 for 70% of friends
• current company. Weighted .8 for companies 200 employees and smaller, .5 for 200-2000, .3 for 2000+
• current residence. Weighted based on size of town a range of say .1 to .5
• current school weight range of .1 to .5
• previous residence, previous company, previous school (1/5 the weight of current ones listed above...or could even base it on how long ago did each attend)
• If you shared an email list with them and there's a user in their system with that same email, then give it a weight of 1

Add all the weights up and sort descending.

Always measure what the user responds with when presented with "Do you know this guy?". Track how many times they clicked no vs yes along with the values in your algorithm. Play with those weights based upon the yes/no response from that individual.

Sometimes the weights might work well for one personality type (popular guy) while another algorithm works better for another (the nerd). With the statistics of how they clicked yes/no and your values in your algorithm, you can learn what personality type they fall into.

-
Thanks for the insight. Definitely gives me a starting point. –  brainydexter Jan 17 '12 at 18:07
Be sure to have the tracking metrics in place to monitor the algorithm, otherwise you'll be left guessing. Be sure to use the yes/no feedback from the users to help tweak the algorithm values. :) Happy coding! –  DMCS Jan 17 '12 at 19:57