-
Notifications
You must be signed in to change notification settings - Fork 99
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
fix landing page after a click #27
base: master
Are you sure you want to change the base?
Conversation
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.
There are some notes
@@ -179,10 +189,13 @@ def step(self, action_id): | |||
|
|||
if reward == 1: | |||
self.state = organic # After a click, Organic Events always follow. | |||
|
|||
initial_product = action_id |
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.
Why we mix up Bandit (action_id) with Organic?
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.
The goal is to land on the product that was clicked in the organic session that follows a successful bandit event. Currently, there is no relationship between the clicked product and the first organic item viewed afterwards.
) | ||
|
||
# Update markov state. | ||
self.update_state() |
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.
Time is not updated, thus BOTH events
Bandit (with Action ID = initial_product)
Organic (with the Product ID = initial_product)
will happen at the same time.
In the case when `initial_product is not None' and we update the state, the state could not be 'organic', that means that we could not generate pure/real Organic events (we do not enter to the following while loop).
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.
Time is updated in update_state. For the first organic event after a bandit event, it will be updated in the update_state command of the step function, just after a click has been drawn. Thus we won't encounter the problem of having a bandit event and an organic event at the same time.
We are in the organic state even though the initial_product is not None (we just choose how to start the organic session), thus the state update works as usual, and we are able to generate organic events, with the only difference that we can choose the initial page of the organic session, which could be useful just after a click.
@flavianv @drohde Fix landing page of the organic session after a click
/!!\ please ignore my precedent pull request, I also included other changes at the same time