I would to build an recommendation service using prediction.io. I think for my need Universal Recommender (http://templates.prediction.io/PredictionIO/template-scala-parallel-universal-recommendation) is a good template. My website show EPG and I want to make recommendation based on user page view for a simple PoC. A page view is an broadcast with some attribute gender, actors, tags, channel, bouquet...
For the beginning I will send only one primary event, the user see the broadcast :
{
"event" : "view",
"entityType" : "user",
"entityId" : "userId",
"targetEntityType" : "item",
"targetEntityId" : "broadcastId",
"properties" : {},
"eventTime" : "2015-10-05T21:02:49.228Z"
}
If I understand the doc, I will have to send using crontask everyday new broadcasts in order to add attributes, and to learn to pio new items :
{
"event" : "$set",
"entityType" : "item",
"entityId" : "broadcastId",
"properties" : {
"bouquet" : ["B1", "B2"],
"people": ["P1", "P2"],
"channel": ["C1"],
"availableDate" : "2015-11-23T21:02:49.228Z",
"expireDate": "2016-10-05T21:02:49.228Z"
},
"eventTime" : "2015-11-23T21:02:49.228Z"
}
Now, I don't know if it's better to use attributes in the broadcast entity or if it's better to send secondary events ? for example :
{
"event" : "view-bouquet",
"entityType" : "user",
"entityId" : "userId",
"targetEntityType" : "item",
"targetEntityId" : "bouquetId",
"properties" : {},
"eventTime" : "2015-10-05T21:02:49.228Z"
}
{
"event" : "view-people",
"entityType" : "user",
"entityId" : "userId",
"targetEntityType" : "item",
"targetEntityId" : "peopleId",
"properties" : {},
"eventTime" : "2015-10-05T21:02:49.228Z"
}
...
{
"event" : "view-channel",
"entityType" : "user",
"entityId" : "userId",
"targetEntityType" : "item",
"targetEntityId" : "channelId",
"properties" : {},
"eventTime" : "2015-10-05T21:02:49.228Z"
}