Users who have seen item A also have seen item B. Are the items in relation each other? A recommendation system has the aim to build different items to get relations available for the others users.
In this article I’m going to speak about how build relations using a Open-source solution named Easyrec.
In one of my previous life, I worked on a project who aim was to produce relations between items while the users browse the web site. I’m speaking about the typical “see also” that you can find in almost every web sites (editorial or e-commerce, that doesn’t matter). To reach this target I made the choice to use Easyrec with the features that I’m going to show you.
Easyrec is a project from the Austrian Smart Agent Technologies. The first release is dated in 2009 (version 0.9). I used the version 0.96 in my project and they’ve just released the version 0.98 in the last May.
The installation is quite easy, you’ve to deploy it under your web application (I used Tomcat 6) and then complete the wizard which asks you the database user and location.
Once it has completed you’ll see something like this.
In the red circles I put the key part of the console interface. In that part, you can see the tenant’s name, the token used for calling the Api and the list of item loaded in the system.
This is only an overlook on the console administration, the official web site has already a good tutorial and it doesn’t need any further explanations. I turn my attention on what Easyrec is able to give in terms of relations and how builds them.
The key point on collecting data in easyrec is all around of three concepts:
- What : What item has been visited?
- Who: Who user has visited the item?
- How: What action has been done to the item?
An example of these concepts could be the follow.
- Item 123
The user “user_123” have seen (View) the item “item_123”. All right? Think about a lot of users who make all this action on the item and you get a dataset built by these array of items. Now, the key is how put them in relations. To do this Easyrec uses the Association Rule Miner algorithm (ARM). You can find more information at http://easyrec.sourceforge.net/wiki/index.php/Association_Rule_Miner.
Once that the rules (relations) have been generated, you can get the relations by item or by user.
The items that you get starting by one item are all the elements who have been browsed together in a unique session by a user.
Let me explain the meaning by using the follow table:
|Item 1||Item 2|
The “item 1” has “item 2” in the see also box. Reading the ARM explanations you can see the relation exists with a weight associated.
If you wanted to get the items starting by a user, the matter would be more complicated. Again, another table:
|Item 1||Item 2||Item 3||Item 4||Item 5||Item 6|
You’ll get for the User 3 the Items 2 and 3.
You can spend some time reading the official guide at http://easyrec.org/about. It’s also available the source code of the whole project and a good documentation and I tried it with very interesting result. Obviously, there are a lot of recommendation products (free or not) in the global market (I’m thinking of Apache Mahout) and I don’t want to build a ranking of them. I think Easyrec is a right compromise between perfomance, features and easiness to use.