I am wondering what algorithm would be clever to use for a tag driven e-commerce enviroment:
-
Each item has several tags. IE:
Item name: “Metallica – Black Album CD”, Tags: “metallica”, “black-album”, “rock”, “music”
-
Each user has several tags and friends(other users) bound to
them. IE:Username: “testguy”, Interests: “python”, “rock”, “metal”, “computer-science”
Friends: “testguy2”, “testguy3”
I need to generate recommendations to such users by checking their interest tags and generating recommendations in a sophisticated way.
Ideas:
- A Hybrid recommendation algorithm can be used as each user has friends.(mixture of collaborative + context based recommendations).
-
Maybe using user tags, similar users (peers) can be found to generate recommendations.
-
Maybe directly matching tags between users and items via tags.
Any suggestion is welcome. Any python based library is also welcome as I will be doing this experimental engine on python language.
1) Weight your tags.
Tags fall into several groups of interest:
(sometimes you may want to consider friend-of-a-friend tags too, but in my experience the effort hasn’t been worth it. YMMV.)
Identify all tags that the person and/or the person’s friends have in interests, and attach a weight to the tags for this individual. One simple possible formula for tag weight is
Note the magic number 2, which makes your own opinion worth twice as much as that of all of your friends put together. Feel free to tweak 🙂
2) Weight your items
For each item that has any of the tags in your list, just add up all of the weighted values of the tags. A higher value = more interest.
3) Apply a threshold.
The simplest way is to show the user the top n results.
More sophisticated systems also apply anti-tags (i.e. topics of non-interest) and do many other things, but I have found this simple formula effective and quick.