Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tag/Keyword based recommendation

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.

like image 704
Hellnar Avatar asked May 08 '10 13:05

Hellnar


People also ask

What are tags in recommendation system?

A tag recommender system is a recommender system which recommends tags to the user. In this context, a tag is defined as a word freely added to an object by a user. Usually there is no limitation on the amount of tags that can be added to an object.

Which is an example of content based recommendation system?

For example, if a user listens to rock music every day, his youtube recommendation feed will get full of rock music and music of related genres. In this, items are ranked according to their relevancy and the most relevant ones are recommended to the user.

What are the types of recommendation?

There are three basic categories or recommendation letters: academic recommendations, employment recommendations, and character recommendations.

Which algorithm is used for recommendation?

The most commonly used recommendation algorithm follows the “people like you, like that” logic. We call it a “user-user” algorithm because it recommends an item to a user if similar users liked this item before. The similarity between two users is computed from the amount of items they have in common in the dataset.


2 Answers

1) Weight your tags.

Tags fall into several groups of interest:

  • My tags that none of my friends share
  • Tags a number of my friends share, but I don't
  • My tags that are shared by a number of my friends.

(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

(tag_is_in_my_list) * 2 + (friends_with_tag)/(number_of_friends)

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.

like image 72
whybird Avatar answered Oct 20 '22 17:10

whybird


If you can, track down a copy of O'Reilly's Programming Collective Intelligence, by Toby Segaran. There's a model solution in it for exactly this problem (with a whole bunch of really, really good other stuff).

like image 24
regularfry Avatar answered Oct 20 '22 18:10

regularfry