In Graphlab, I am trying to use recommend() method, to see how it provides recommendation for a new user(user_id) which isn't present in the trained model prepared from give dataset. Since the aim is to determine similar users through this recommendation model used, so I plan to pass the new_user_data in recommend(), but with exact same item- ratings of an existing user to check if it should returns the same ratings. Here is what I am doing:
(data is the dataset containing UserIds, ItemIds and Rating columns) (say 104 is a new UserId which isn't in data set)
result=graphlab.factorization_recommender.create(data,user_id='UserId',
item_id='ItemId',target='Rating')
new_user_info=graphlab.SFrame({'UserId':104,'ItemId':['x'],'Rating':9})
r=result.recommend(users=104,new_user_data=new_user_info)
I am getting an error:
raise exc_type(exc_value)
TypeError: object of type 'int' has no len()
Can anyone help as to how to use recommend() method for new user ?