Dear all,

I’m new to Predictionio, currently I’m using it and I managed to import (rate, 
buy) events and getting pretty good results querying it. But now I want to 
limit the results for items in specific categories. I’ve created events for 
items’ properties (categories) as well .

I am posting this query to engine but it seems doesn’t care about the 
categories and returns same result every time.

{ "user": "674296", "num": 10, "categories" : ["CAT2", "CAT1"] }

I’ve imported bellow events

client.create_event(event="rate",
entity_type="user",
entity_id=int(row['userid']),
target_entity_type="item",
target_entity_id=int(row['itemid']),
properties= { "rating" : float(row['rating']) });

client.create_event(
event="buy",
entity_type="user",
entity_id=int(row['userid']),
target_entity_type="item",
target_entity_id=int(row['itemid']), );

client.create_event(
event="$set",
entity_type="item",
entity_id=itemid,
properties= { "categories": itemcats }
);

Could someone give me a solution or hint to how customize this recommender 
engine to take the categories into account.

Thanks in advance
Hossein

Reply via email to