apple / turicreate

Turi Create simplifies the development of custom machine learning models.
BSD 3-Clause "New" or "Revised" License
11.19k stars 1.14k forks source link

Side information usage on ItemSimilarityRecommender #3436

Open Michaelliem99 opened 2 years ago

Michaelliem99 commented 2 years ago

I am asking regarding the usage of user and item side information on the ItemSimilarityRecommender model. I read the documentation and it said that "Currently, ItemSimilarityRecommender does not leverage the use of side features user_data and item_data." But when I tried to create the model and still include the side information, it changed the recommendation result significantly. How does the calculation differ when side information exists? Tried searching for it but can't find anything

leandropeya commented 1 year ago

Hi @Michaelliem99 , did you solved this problem? I'm facing the same issue. I don't know how to use this side information to generate recommendations. In my case I have the following data schema: user_id, item_id and day_of_week as "Additional observation features". When I try to get a recommendation given a context (day_of_week) what I'm currently doing is passing the context as the following:

context = tc.SFrame({'user_id': [12705968], 'day_of_week':['Friday'], 'item_id':[-1]})
results_2 = model_2.recommend(users=[12705968], new_observation_data=context)

But I'm not sure if this is how it should be since the lack of documentation.

Michaelliem99 commented 1 year ago

I think this is actually a different problem, as I wanted to know how does the calculation work with side features (user_data and item_data). But from the documentation that I read, the side data is limited to 2 things:

  1. user_data: additional information of the user (demographics, location, etc)
  2. item_data: additional information of the item (category, size, color, etc)

So, if day_of_week is not related to those 2 things, then you can't use it.

As an alternative, if you want to create a recommendation for different days of the week, maybe you can create 7 different recommendation models, 1 for each day.