-
Notifications
You must be signed in to change notification settings - Fork 9
Match credit-array indices against impressions in descending order #278
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
Conversation
9824fe4
to
dcebe57
Compare
Maybe |
Makes sense. We may want to replace all instances in the spec of |
I'll wait to do the renaming until after #276 is merged. |
9c10099
to
f0a59ba
Compare
@martinthomson Friendly ping for this. |
This makes the credit array resemble an infinite list that is truncated at the point at which its values become 0. For example, [.5, 0.25, 0.25] now means that the last 3 impressions will be matched, and the last one will be given half of the credit, while the next two will receive one quarter each.
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.
This is the right way around.
Co-authored-by: Martin Thomson <[email protected]>
This also adds some test coverage for
N>1
, which revealed a number of bugs in the simulator.Fixes #277
Preview | Diff