- Newest
- Most votes
- Most comments
Hi!
When you use Amazon Personalize and the user personalization recipe, the model learns from your data. If people tend to repeatedly buy the same item, that is what will be recommended. However there are ways you can further control this. I recommend looking at the Amazon Personalize promotions feature (https://aws.amazon.com/blogs/machine-learning/customize-your-recommendations-by-promoting-specific-items-using-business-rules-with-amazon-personalize/). You can for instance create a promotion so that 50% (or a different percentage that makes sense for your business) are of items the user has not purchased before but that are still relevant for this user. You do this by creating a filter on the interactions for not purchased items and then applying a promotion. This way you can keep the personalization, but also enforce some variability.
Also regarding the "round" metadata, I wanted to check: are you also sending the "round" metadata when you do the getRecommendations request? This is the only way this context can be taken into account i.e. if there is a difference in behaviour in different rounds. Amazon Personalize can then know what round you are requesting recommendations for. I assume you are doing this already, but wanted to confirm.
Anna_G, thank you for all your answers.
Thank you for the details about the promotion.
However, I personally do not want to control with promotions.
Because buying the same items over and over is normal for specialized builds.
So I think it is difficult to control them because I believe it is a case by case basis whether you want to prioritize unpurchased items or not.
Thanks also for the metadata on ROUND.
I only get recommendations from the AWS console, and I mistakenly thought the API was the same since there was no way to send a context in the console.
So I used getRecommendations to send the round. The source code is at the bottom.
However, the result was not so different from before.
Indeed, the response changed partially but not significantly after adding "round".
The results are shown here.Note that this user has learned put_events up to round 4.
- round5
[{'itemId': '1', 'score': 0.0555667}, {'itemId': '27', 'score': 0.0506263}, {'itemId': '26', 'score': 0.0473667}, {'itemId': '13', 'score': 0.0452561}, {'itemId': '5', 'score': 0.0447644}, {'itemId': '2', 'score': 0.0427049}, {'itemId': '25', 'score': 0.0395148}, {'itemId': '23', 'score': 0.0380003}, {'itemId': '24', 'score': 0.035642}, {'itemId': '31', 'score': 0.0340813}, {'itemId': '9', 'score': 0.030955}, {'itemId': '17', 'score': 0.0269283}, {'itemId': '21', 'score': 0.0264517}, {'itemId': '8', 'score': 0.025525}, {'itemId': '4', 'score': 0.0212729}, {'itemId': '16', 'score': 0.0212536}, {'itemId': '57', 'score': 0.0180247}, {'itemId': '34', 'score': 0.0167012}, {'itemId': '32', 'score': 0.0159745}, {'itemId': '38', 'score': 0.0156481}, {'itemId': '14', 'score': 0.0148284}, {'itemId': '35', 'score': 0.0143579}, {'itemId': '29', 'score': 0.0143412}, {'itemId': '36', 'score': 0.0135814}, {'itemId': '89', 'score': 0.0128924}]
- round6
[{'itemId': '1', 'score': 0.0544268}, {'itemId': '27', 'score': 0.0537215}, {'itemId': '13', 'score': 0.0468896}, {'itemId': '2', 'score': 0.0449484}, {'itemId': '26', 'score': 0.0443178}, {'itemId': '5', 'score': 0.0435288}, {'itemId': '25', 'score': 0.0384676}, {'itemId': '24', 'score': 0.036648}, {'itemId': '23', 'score': 0.0359846}, {'itemId': '31', 'score': 0.0338005}, {'itemId': '9', 'score': 0.0292327}, {'itemId': '17', 'score': 0.0267265}, {'itemId': '21', 'score': 0.0256245}, {'itemId': '8', 'score': 0.0241058}, {'itemId': '4', 'score': 0.0223789}, {'itemId': '16', 'score': 0.0206327}, {'itemId': '57', 'score': 0.0185087}, {'itemId': '38', 'score': 0.015731}, {'itemId': '34', 'score': 0.0156028}, {'itemId': '32', 'score': 0.0153947}, {'itemId': '14', 'score': 0.0151968}, {'itemId': '35', 'score': 0.0151828}, {'itemId': '29', 'score': 0.0141279}, {'itemId': '89', 'score': 0.0137972}, {'itemId': '36', 'score': 0.0132845}]
- round7
[{'itemId': '1', 'score': 0.0562894}, {'itemId': '27', 'score': 0.0526726}, {'itemId': '26', 'score': 0.0510002}, {'itemId': '2', 'score': 0.0483601}, {'itemId': '13', 'score': 0.0460107}, {'itemId': '5', 'score': 0.0459036}, {'itemId': '25', 'score': 0.0381629}, {'itemId': '23', 'score': 0.0370996}, {'itemId': '24', 'score': 0.035449}, {'itemId': '31', 'score': 0.0332316}, {'itemId': '9', 'score': 0.028743}, {'itemId': '17', 'score': 0.0247091}, {'itemId': '8', 'score': 0.0243327}, {'itemId': '21', 'score': 0.0241129}, {'itemId': '4', 'score': 0.0223307}, {'itemId': '16', 'score': 0.0216642}, {'itemId': '34', 'score': 0.0174355}, {'itemId': '57', 'score': 0.0171976}, {'itemId': '14', 'score': 0.016023}, {'itemId': '32', 'score': 0.0157753}, {'itemId': '38', 'score': 0.0151056}, {'itemId': '35', 'score': 0.0140179}, {'itemId': '29', 'score': 0.013737}, {'itemId': '36', 'score': 0.0134809}, {'itemId': '89', 'score': 0.0116171}]
- round16
[{'itemId': '1', 'score': 0.0540789}, {'itemId': '27', 'score': 0.0495268}, {'itemId': '26', 'score': 0.049191}, {'itemId': '13', 'score': 0.0485498}, {'itemId': '2', 'score': 0.0482758}, {'itemId': '5', 'score': 0.0445756}, {'itemId': '25', 'score': 0.0391537}, {'itemId': '23', 'score': 0.0371481}, {'itemId': '24', 'score': 0.0362455}, {'itemId': '31', 'score': 0.0316734}, {'itemId': '9', 'score': 0.0288406}, {'itemId': '17', 'score': 0.0251541}, {'itemId': '21', 'score': 0.0235289}, {'itemId': '8', 'score': 0.0233633}, {'itemId': '4', 'score': 0.0221425}, {'itemId': '16', 'score': 0.0208343}, {'itemId': '57', 'score': 0.0171059}, {'itemId': '34', 'score': 0.0170289}, {'itemId': '14', 'score': 0.0158862}, {'itemId': '38', 'score': 0.0153976}, {'itemId': '32', 'score': 0.0153184}, {'itemId': '35', 'score': 0.0144443}, {'itemId': '29', 'score': 0.0138999}, {'itemId': '89', 'score': 0.0129483}, {'itemId': '36', 'score': 0.0128481}]
In this way, it seems that the round data is not taken into account very much.
How can I get the results I want from these things?
I apologize for relying on you, but I would appreciate your response.
- GetRecommed code
client = boto3.client('personalize-runtime')
response = client.get_recommendations(
campaignArn="arn:aws:personalize:ap-northeast-1:620988379686:campaign/mycampaign",
userId="10001",
context={"round": "16"}
)
Relevant content
- Accepted Answerasked 5 years ago
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Anna_G, thank you for all your answers. I wrote in the answer section because of the length of the reply.