New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/boosting rules #111
Conversation
@@ -239,6 +265,13 @@ protected function getCommandType(): string | |||
return 'user-based-recommendations'; | |||
} | |||
|
|||
protected function serializeBoosts(): array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protected function serializeBoosts(): array | |
protected function getSerializedBoosts(): array |
To make it clear from the name the method does not have sideffects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
README.md
Outdated
@@ -227,6 +227,15 @@ $recommendations = $response->getRecommendation()->getData(); | |||
// } | |||
``` | |||
|
|||
You can further modify which items will be reccomended by providing boosting rules. Priority of items matching the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can further modify which items will be reccomended by providing boosting rules. Priority of items matching the | |
You can further modify which items will be recommended by providing boosting rules. Priority of items matching the |
README.md
Outdated
@@ -227,6 +227,15 @@ $recommendations = $response->getRecommendation()->getData(); | |||
// } | |||
``` | |||
|
|||
You can further modify which items will be reccomended by providing boosting rules. Priority of items matching the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move this whole added section right before "From $response, you can also access rest of the data:".
Or maybe better merge it with the example following "You can also set more granular options of the recommendation command", something like this:
$recommendation = UserRecommendation::create('user-id', 5, 'test-scenario', 1.0, 3600);
$recommendation->setFilters(['for_recommendation = 1'])
->addBoost(Boost::create('valid_to >= NOW()', 2)) // Priority of items matching the Booster criteria will be multiplied by the value of multiplier
->addBoost(Boost::create('for_recommendation = 1', 3.5))
->setMinimalRelevance(MinimalRelevance::HIGH())
->enableHardRotation();
$response = $matej->request()
->recommendation($recommendation)
->send();
Co-Authored-By: Ondřej Machulda <ondrej.machulda@lmc.eu>
Co-Authored-By: Ondřej Machulda <ondrej.machulda@lmc.eu>
Co-Authored-By: Ondřej Machulda <ondrej.machulda@lmc.eu>
Co-Authored-By: Ondřej Machulda <ondrej.machulda@lmc.eu>
All fixed. I'll squash on merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found just one glitch in readme, otherwise ✅
Thanks 👍
Co-Authored-By: Ondřej Machulda <ondrej.machulda@lmc.eu>
No description provided.