get_similar_items in recommendation: How to get product to product similarity by features

User 1649 | 4/9/2015, 12:51:43 PM

I am playing around recommendation library from graph lab for e commerce application. I want to compute product to product similarity.

I was looking into graphlab.recommender.itemsimilarityrecommender.ItemSimilarityRecommender.getsimilaritems it says it computes item-item similarities based on users in common.

I was expecting, I should be allowed to specify features on which the similarity must be computed.

eg:

I have 4 products

				prod1,		prod2,		prod3,		prod4
				------		------		------		------

RAM: 2, 3, 4, 1 brand: Samsung S4, Iphone 5S , Iphone 6, Samsung S5
power: 2500, 3000, 3000, 2100

Here, For prod1 It should list prod4 as similar. It should rank according to similarity score.

But what I found was

sf = graphlab.SFrame({'userid': ["0", "0", "0", "1", "1", "2", "2", "2"], 'itemid': ["a", "b", "c", "a", "b", "b", "c", "d"]}) m = graphlab.itemsimilarityrecommender.create(sf) nn = m.getsimilaritems()

Can I incorporate features in this?

Comments

User 1190 | 4/9/2015, 5:26:55 PM

Hi @vij,

You can use the feature based similarity by providing nearest_items to the create method: https://dato.com/products/create/docs/generated/graphlab.recommender.itemsimilarityrecommender.create.html#graphlab.recommender.itemsimilarityrecommender.create

You can compute an SFrame of nearestitems using our nearest neighbor toolkit. You might find it useful to read our User Guide. https://dato.com/learn/userguide/nearestneighbors/nearest_neighbors.html

We also have an example of item similarity recommender using side features in this blog: http://blog.dato.com/building-predictive-applications-with-dato

Thank you for your question! -jay