3

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"
}
jrweb247
  • 95
  • 1
  • 8

1 Answers1

0

It depends on what you want to do. If you want to be able to filter and/or boost on these, add them as properties on the item; if you want them to influence/improve the model via cross-coocurrence calcuation, send them as secondary events. [Or do both if/when it makes sense for you]

  • I don't need to boost and/or filter in my case because the UR only allow to boost a value of an attribute and I would like to boost an attribute, to give weight on attributes. For exemple "bouquet" could be set as more important than "channel" – jrweb247 Dec 10 '15 at 12:54