Though there are four different types of recommendation methods, now which one to apply when. If the products or items are bought in a batch, then it is preferred by practitioners to apply association rules, which is also known as market basket analysis. In a retail or e-commerce domain, the items are generally purchased in a lot. Hence, when a user adds a certain product to his/her cart, other products can be recommended to him/her based on the aggregate basket component as reflected by majority of the buyers.
If the ratings or reviews are explicitly given for a set of items or products, it makes sense to apply user based collaborative filtering. If some of the ratings for few items are missing still the data can be imputed, once the missing ratings predicted, the user similarity can be computed and hence recommendation can be generated. For user-based collaborative filtering, the data would look as follows:
User |
Item1 |
Item2 |
Item3 |
Item4 |
Item5 |
Item6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table 1: User-based item sample dataset
If the binary matrix is given as an input, where the levels represent whether the product is bought or not, then it is recommended to apply item-based collaborative filtering. The sample dataset is given next:
User |
Item1 |
Item2 |
Item3 |
Item4 |
Item5 |
Item6 |
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
| |
|
|
|
|
|
| |
|
|
|
|
| ||
|
|
|
|
| ||
|
|
|
|
|
| |
|
|
|
|
|
| |
|
|
|
|
|
| |
|
|
|
|
|
|
|
Table 2: Item-based collaborative filtering sample dataset
If the product description details and the item description are given and the user search query is collected, then the similarity can be measured using content-based collaborative filtering method:
Title |
Search query |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table 3: Content-based collaborative filtering sample dataset
18.218.136.90