I should choose a recommending system algorithm & simulate it in the field of social network. The only algorithm I could find it’s code is slope-one. I have 2 question:
-
Is this algorithm suitable for social network? If the answer is negative, Would you please introduce me an other useful algorithm?
-
I don’t know, how can I do this simulation? what should I do? & what’s it’s requirements?
any guide would be helpful, thank you.
1.
Slope One is a really simplistic one, but yeah, you could probably use it. Facebook uses EdgeRank for newsfeed.
2.
As per your comment, what are your requirements/preferences as far as language, framework, etc? If you’re open to , if you’ll pardon the pun, recommendations, I’d suggest an ASP.Net MVC 3 web project.
Setting up the data will be a matter of setting up a
"Person"or"Friend"class (this is assuming you want a friend recommendation — you could just as easily do this with groups, pages, apps, etc — your choice). Then, you’ll create several (the more the better) instances of that class, with randomized names, properties, etc. Google search random generators for this – I’m sure you’ll find something. Or write the code for it yourself. If you can’t do either of those, write me back on here and I’ll throw together some code for it.Then, you’re going to set up a small-scale representation of a network. That is, define the relationships between your “People”. There are several ways to do this, but in your scenario you could probably get away with giving each
PersonObject a"Friends"property, which holds a reference to otherPersonobjects.I’m going to leave the algorithm implementation a little more up to you (since this is a scholarly project, I have to let you learn, right?), but here is a little bit of groundwork to get you started:
Using the implementation you showed me, you could set up a class like so:
This is a very very simple example, but basically it works like this: For every friend of person a, if person b also has this friend, the rating between person a and b gets a little bit better. You’ll want to add other scenarios to this (for example, you might add 5 rating if friend a and friend b live in the same city, and 5 for same school, job, etc. Then you can set up a dictionary (or something) of ratings for a given Person, like this:
So now you have a table of ratings set up, and you can use the implementation you found to do the rest.
If you need any more nudges in the right direction as you go, I’d be happy to help. Just comment back on here.
Helpful references
Good luck!