predictionio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pat Ferrel <>
Subject Re: UR optimizing results
Date Wed, 24 May 2017 15:41:56 GMT
Secondary events are hard to come by for “complimentary purchases" because, as you point
out, the entity being tracked is a cart, not a user. The cart has few possible actions or
indicators that can be associated with it. The use has many. Also the cart does not have a
brain we are trying to look into, humans do and cross-indicators are how we look into different
aspects of the human mind.

Back to earth…

You can do a query on a cart-id if you are sending (cart-id, add-to-cart, item-id) in realtime
but it’s usually not as convenient as doing an “itemSet” query with the contents of
the user’s cart against the model build from cart-transactions, which I assume are purchases
tied to a cart id. One small flaw in this is that tracking add-to-cart doesn’t account for
remove-from-cart vey well. So training on cart-level purchases and querying with the current
contents intuitively seems better. It would take a rigorous A/B test to know for sure.

On May 24, 2017, at 8:28 AM, Dennis Honders <> wrote:

Current data: 

{"event": "cart-transaction", "entityId": "1", "entityType": "user", "targetEntityId": "12",
"targetEntityType": "item"}, 

{"event": "$set", "entityType": "item", "entityId": "12", "properties": {"category": ["1",
"2", "3", "4", "5", "6", "7"], "manufacturer": 1, "label": "test", "price": "$1-$2"}}


Cart-transaction is the primary for shopping cart recommendation, maybe use user-buy-item
as secondary event or is there no link between this?

Item-based queries are for similar items. For shopping cart recommendations, complementary
recommendations will suite better? If so, those are made by 'user-id' (cart-id). How can this
be done?

I like to do content-based recommendation for items that haven't been in a transaction. I
think this can be configured in the engine.json. Any advice for doing this?


  "comment":" This config file uses default settings for all but the required values see
for docs",
  "id": "default",
  "description": "Default settings",
  "engineFactory": "com.actionml.RecommendationEngine",
  "datasource": {
    "params" : {
      "name": "ur-name",
      "appName": "Test",
      "eventNames": ["cart-transaction"]
  "sparkConf": {
    "spark.serializer": "org.apache.spark.serializer.KryoSerializer",
    "spark.kryo.registrator": "",
    "spark.kryo.referenceTracking": "false",
    "spark.kryoserializer.buffer.mb": "300",
    "spark.kryoserializer.buffer": "300m",
    "": "true"
  "algorithms": [
      "comment": "simplest setup where all values are default, popularity based backfill,
must add eventsNames",
      "name": "ur",
      "params": {
		"appName": "Test",
		"indexName": "test",
		"typeName": "cart",
		"comment": "must have data for the first event or the model will not build, other events
are optional",
		"eventNames": ["cart-transaction"],
		"maxEventsPerEventType": 50000,
		"maxCorrelatorsPerEventType": 5000,
		"num": 10, 
		"itemBias": 2.0,
		"rankings": [{
			"name": "preferredRank",
			"type": "userDefined"

View raw message