Universal Recommender General Queries

113 views
Skip to first unread message

Mayank Mangal

unread,
Sep 7, 2021, 5:30:34 AM9/7/21
to action...@googlegroups.com
Hi fellow UR users, 

I have few doubts in the Universal Recommender template that I am using currently with my PredictionIO framework:

1) How do I recommend items based on the user preferences without using them in the query? The algorithm itself should be recommending items based on the user preferences. I have a separate data of user preference which I can put as an input. But where exactly should I put it. Need help.

2) How does UR treat the properties of $set events of Items? Does it see it as text data describing the item properties and use NLP there to process it to recommend better or is it just for the querying purpose? Also, how can I keep few of the columns in $set events of items to train, and few columns just for the querying purpose?

3) How can I recommend items based on the recency of items. For example, if there is a new item introduced recently and I want to rank it higher in the recommendations, is there any way I can achieve that? Also, there is an expiry date for each item, hence beyond that date it should not be recommended.

4) How exactly should I decide on the user and item bias values in the query?

Please someone help me in regard to these questions. It will be of great help!

...
Regards,
Mayank Mangal

Mayank Mangal

unread,
Sep 8, 2021, 8:19:33 AM9/8/21
to actionml-user
Can anyone please reply to this? This is a bit urgent for me as I am stuck in this.

Pat Ferrel

unread,
Sep 8, 2021, 3:08:23 PM9/8/21
to Mayank Mangal, actionml-user
First you should not use PredictionIO — we have replaced it with Harness, a more modern easier to use ML Server. see https://actionml.com/docs/harness_intro

It includes theUniversal Recommender. 

On Sep 8, 2021, at 5:19 AM, 'Mayank Mangal' via actionml-user <action...@googlegroups.com> wrote:

Can anyone please reply to this? This is a bit urgent for me as I am stuck in this.

On Tuesday, September 7, 2021 at 3:00:34 PM UTC+5:30 Mayank Mangal wrote:
Hi fellow UR users, 

I have few doubts in the Universal Recommender template that I am using currently with my PredictionIO framework:

1) How do I recommend items based on the user preferences without using them in the query? The algorithm itself should be recommending items based on the user preferences. I have a separate data of user preference which I can put as an input. But where exactly should I put it. Need help.

For ecom start with a “primary indicator” of “buy”, then add other things you know about user behavior like “detail-view” or “category-preference”, you can even add “search-terms” where the targetEntityId is the term itself. These are made into “events” sent as inout to the engine. 

2) How does UR treat the properties of $set events of Items? Does it see it as text data describing the item properties and use NLP there to process it to recommend better or is it just for the querying purpose? Also, how can I keep few of the columns in $set events of items to train, and few columns just for the querying purpose?

Properties are textual (or datetimes) They are used as to filter the recommendations. See the examples in the docs on Ahttps://actionml.com/docs/h_ur_queries#business-rules for a duscussion of various business rules you can build. 

3) How can I recommend items based on the recency of items. For example, if there is a new item introduced recently and I want to rank it higher in the recommendations, is there any way I can achieve that? Also, there is an expiry date for each item, hence beyond that date it should not be recommended.

This is a deceptively complicated question. How would you want “recent” items to benefit from “recency”? What is recent? When would recency override the strength of recommendation? Why does recent override what we think the user wants? 

You can filter recommendations to be items with a timestamp after some datetime with buiness rules https://actionml.com/docs/h_ur_queries#business-rules

4) How exactly should I decide on the user and item bias values in the query?

ignore them, there is typically no reason to use them.

Please someone help me in regard to these questions. It will be of great help!

...
Regards,
Mayank Mangal

--
You received this message because you are subscribed to the Google Groups "actionml-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to actionml-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/actionml-user/0c859c07-b35a-4a1e-88bb-5d0e8a092112n%40googlegroups.com.

Mayank Mangal

unread,
Sep 8, 2021, 4:15:37 PM9/8/21
to Pat Ferrel, actionml-user
Thanks for the reply Pat.. i really appreciate it.

On Thu, Sep 9, 2021, 12:38 AM Pat Ferrel <p...@actionml.com> wrote:
First you should not use PredictionIO — we have replaced it with Harness, a more modern easier to use ML Server. see https://actionml.com/docs/harness_intro

It includes theUniversal Recommender. 

On Sep 8, 2021, at 5:19 AM, 'Mayank Mangal' via actionml-user <action...@googlegroups.com> wrote:

Can anyone please reply to this? This is a bit urgent for me as I am stuck in this.

On Tuesday, September 7, 2021 at 3:00:34 PM UTC+5:30 Mayank Mangal wrote:
Hi fellow UR users, 

I have few doubts in the Universal Recommender template that I am using currently with my PredictionIO framework:

1) How do I recommend items based on the user preferences without using them in the query? The algorithm itself should be recommending items based on the user preferences. I have a separate data of user preference which I can put as an input. But where exactly should I put it. Need help.

For ecom start with a “primary indicator” of “buy”, then add other things you know about user behavior like “detail-view” or “category-preference”, you can even add “search-terms” where the targetEntityId is the term itself. These are made into “events” sent as inout to the engine. 

Okay. I'll try this once and see the results. Currently, I tried it by creating user events and have set the properties according to user preferences. It was certainly not giving good results for me. Items were recommended from out of user preferences in most cases.

2) How does UR treat the properties of $set events of Items? Does it see it as text data describing the item properties and use NLP there to process it to recommend better or is it just for the querying purpose? Also, how can I keep few of the columns in $set events of items to train, and few columns just for the querying purpose?

Properties are textual (or datetimes) They are used as to filter the recommendations. See the examples in the docs on Ahttps://actionml.com/docs/h_ur_queries#business-rules for a duscussion of various business rules you can build. 

Okay, so there is no text similarity kind of algorithm working here to recommend matching items. Example, if two items have almost similar item description, won't they be considered similar and recommended together? 
Also a follow up question here is what if I want to change the weightage of item property columns or user preferences? Sometimes if a user has set preference to buy items from a specific category and description containing a specific word, I need to recommend him the items from only that specific category, however, it may/may not contain that specific word. I don't want to use any business rules in the query, it should come automatically from the recommendations. I hope you got my issue.

3) How can I recommend items based on the recency of items. For example, if there is a new item introduced recently and I want to rank it higher in the recommendations, is there any way I can achieve that? Also, there is an expiry date for each item, hence beyond that date it should not be recommended.

This is a deceptively complicated question. How would you want “recent” items to benefit from “recency”? What is recent? When would recency override the strength of recommendation? Why does recent override what we think the user wants? 

You can filter recommendations to be items with a timestamp after some datetime with buiness rules https://actionml.com/docs/h_ur_queries#business-rules

By recency I mean that if there are 2 recommendations given by UR and one is having an old published date while another has a newer published date. Here I'd prefer to move the item with newer date higher in the recommendations order.

4) How exactly should I decide on the user and item bias values in the query?

ignore them, there is typically no reason to use them.

Alright.

Pat Ferrel

unread,
Sep 8, 2021, 6:08:55 PM9/8/21
to Mayank Mangal, actionml-user

On Sep 8, 2021, at 1:15 PM, Mayank Mangal <mayank...@ofbusiness.in> wrote:

Thanks for the reply Pat.. i really appreciate it.

On Thu, Sep 9, 2021, 12:38 AM Pat Ferrel <p...@actionml.com> wrote:
First you should not use PredictionIO — we have replaced it with Harness, a more modern easier to use ML Server. see https://actionml.com/docs/harness_intro

It includes theUniversal Recommender. 

On Sep 8, 2021, at 5:19 AM, 'Mayank Mangal' via actionml-user <action...@googlegroups.com> wrote:

Can anyone please reply to this? This is a bit urgent for me as I am stuck in this.

On Tuesday, September 7, 2021 at 3:00:34 PM UTC+5:30 Mayank Mangal wrote:
Hi fellow UR users, 

I have few doubts in the Universal Recommender template that I am using currently with my PredictionIO framework:

1) How do I recommend items based on the user preferences without using them in the query? The algorithm itself should be recommending items based on the user preferences. I have a separate data of user preference which I can put as an input. But where exactly should I put it. Need help.

For ecom start with a “primary indicator” of “buy”, then add other things you know about user behavior like “detail-view” or “category-preference”, you can even add “search-terms” where the targetEntityId is the term itself. These are made into “events” sent as inout to the engine. 

Okay. I'll try this once and see the results. Currently, I tried it by creating user events and have set the properties according to user preferences. It was certainly not giving good results for me. Items were recommended from out of user preferences in most cases.

putting properties into the events will not work! The entityType for an event is “user” so even if it did work, it would set user properties not item properties. Properties MUST be set with $set type events where the entityType is “item”. Furthermore properties do not affect the quality of recommendations, they are only useful for business rules. Like “in-stock”: “true” to get only items that are in-stock.
 

2) How does UR treat the properties of $set events of Items? Does it see it as text data describing the item properties and use NLP there to process it to recommend better or is it just for the querying purpose? Also, how can I keep few of the columns in $set events of items to train, and few columns just for the querying purpose?

Properties are textual (or datetimes) They are used as to filter the recommendations. See the examples in the docs on Ahttps://actionml.com/docs/h_ur_queries#business-rules for a duscussion of various business rules you can build. 

Okay, so there is no text similarity kind of algorithm working here to recommend matching items. Example, if two items have almost similar item description, won't they be considered similar and recommended together? 
Also a follow up question here is what if I want to change the weightage of item property columns or user preferences? Sometimes if a user has set preference to buy items from a specific category and description containing a specific word, I need to recommend him the items from only that specific category, however, it may/may not contain that specific word. I don't want to use any business rules in the query, it should come automatically from the recommendations. I hope you got my issue.

No. Text similarity is best left for Elasticsearch itself. Similarity in collaborative filtering recommenders is based on the similarity of user’s behavior associated with them. This far out-performs any content based similarity. Content based similarity will give you “blue” items even though one is a shirt and another is an automobile. Content similarity is often very misleading where user behavior is not. For instance few people bought the blue shirt at the same time as buying the blue automobile but many people buy an orange shirt and a blue shirt.


3) How can I recommend items based on the recency of items. For example, if there is a new item introduced recently and I want to rank it higher in the recommendations, is there any way I can achieve that? Also, there is an expiry date for each item, hence beyond that date it should not be recommended.

This is a deceptively complicated question. How would you want “recent” items to benefit from “recency”? What is recent? When would recency override the strength of recommendation? Why does recent override what we think the user wants? 

You can filter recommendations to be items with a timestamp after some datetime with buiness rules https://actionml.com/docs/h_ur_queries#business-rules

By recency I mean that if there are 2 recommendations given by UR and one is having an old published date while another has a newer published date. Here I'd prefer to move the item with newer date higher in the recommendations order.

Recommendation strength gives a floating point score and these are used to sort recs. These very seldom end in a tie of scores so any secondary sorting would never be used. If you want to throw out scores for sorting recommendations you are likely to make recs worse but you can always do this since you know the date of the item being made available. You can throw out the scores for the 10 recs and sort them any way you want. BTW the UR does NOT know when an item is made available. This can be added as a property (with $set) and can be used to filter but not as a secondary sorting key.

Why do you want recent things favored? Doesn’t it matter most to get the RIGHT recommendation? Are older things out of stock or in some way not recommendable? If so create a buisiness rule to filter by the “in-stock” property or by how old the item is, if they all age out of recs in 30 days, for instance, you can filter out all older items from recs but leave the sort order based on recs scores — recommendation strength.
Reply all
Reply to author
Forward
0 new messages