predictionio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hossein Bahrami <h.bahr...@live.com>
Subject Customizing Recommender engine
Date Tue, 13 Dec 2016 09:55:00 GMT
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
Mime
View raw message