predictionio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pat Ferrel <>
Subject Re: Implementing cart and wishlist item events into Ecommerce recommendation template
Date Sat, 04 Nov 2017 17:20:32 GMT
Oh, forgot to say the most important part. The ECom recommender does not support shopping carts
unless you train on (cart-id, item-id-of item added-to-cart) And even then I’m not sure
you can query with the current cart’s contents since the item-based query is for a single
item. The cart-id takes the place of user-id in this method of training and there may be a
way to do this in the MLlib implementation but It isn’t surfaced in the PIO interface. It
would be explained as an anonymous user (one not in the training data) and will take an item
list in the query. Look into the MLlib ALS library and expect to modify the template code.

There is also the Complimentary Purchase template, which does shopping carts but, from my
rather prejudiced viewpoint, if you need to switch templates use one that supports every use-case
you are likely to need.

On Nov 4, 2017, at 9:34 AM, Pat Ferrel <> wrote:

The Universal Recommender supports several types of “item-set” recommendations:
1) Complimentary Purchases. which are things bought with what you have in the shopping cart.
This is done by training on (cart-id, “add-to-cart”, item-id) and querying with the current
items in the user’s cart. 
2) Similar items to those in the cart, this is done by training with the typical events like
purchase, detail-view, add-to-cart., etc. for each user, then the query is the contents of
the shopping cart as a “item-set”. This give things similar to what is in the cart and
usually not the precise semantics for a shopping cart but fits other cases of using an items-set,
like wish-lists
3) take the last n items viewed and query with them and you have “recommendations based
on your recent views” In this case you need purchases as the primary event because you want
to recommend purchases but using only “detail-views” to do so. 
4) some other combinations like favorites, watch-lists, etc.

These work slightly different and I could give examples of how they are used in Amazon but
#1 is typically used for the “shopping cart"

On Nov 3, 2017, at 7:13 PM, ilker burak < <>>

Hi Vaghan,
I will check that. Thanks for your help and quick answer about this.

On Fri, Nov 3, 2017 at 8:02 AM, Vaghawan Ojha < <>>
Hey there, 

did you consider seeing this:

for considering such events you may want to use the $set events as shown in the template documentation.
I use universal recommender though since already supports these requirements. 

Hope this helps. 

On Fri, Nov 3, 2017 at 10:37 AM, ilker burak < <>>
I am using Ecommerce recommendation template. Currently i imported view and buy events and
it works. To improve results accuracy, how can i modify code to import and use events like
'user added item to cart' and 'user added item to wishlist'? I know this template supports
to add new events but there is only example in site about how to implement rate event, whic
i am not using rate data.
Thank you


You received this message because you are subscribed to the Google Groups "actionml-user"
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to <>.
To view this discussion on the web visit
For more options, visit <>.

View raw message