Skip to content
Snippets Groups Projects
Commit 553102fc authored by Samuel Huang's avatar Samuel Huang Committed by Chromium LUCI CQ
Browse files

[M131][MVT] Add "Decay, Cap 1" scoring algorithm, behind flags.

This CL adds Most Visited Tiles scoring algorithm "Decay, Cap 1"
(maxtk@) to #most-visited-tiles-new-scoring:
* Recency factor is a decaying exponential.
* Visit count is capped to 1, i.e., we only care about whether a site
  is visited each day, and not how many times.

Feature param changes:
* Under "recency_factor": Add new value "decay".
* Add "decay_per_day" param: Double to specify how each passing day
  attenuates a visit's score contribution. Currently useful only for the
  recency_factor "decay".

Values chosen for "Decay, Cap 1":
* "decay_per_day": 0.9131007162822623 = exp(-1 / 11).
* "daily_visit_count_cap": 1.

Note: "Decay Staircase, Cap 10" essentially uses "decay_per_day" value
of 0.9355069850316178 = exp(-1 / 15). However, since experiments are
already underway and there are other parameters, so for simplicity we
left RecencyFactorDecayStaircase alone (instead of adapting it to use
"decay_per_day").

Code changes, including some refactoring:
* SegmentScorer:
  * Change CTOR to take RecencyFactor instead of name; update callers.
  * static CreateFromFeatureFlags(): Extract RecencyFactor-related logic
    to new function RecencyFactor::CreateFromFeatureFlags().
  * Add RecencyFactorDecay.
  * RecencyFactor: Add static CreateFromFeatureFlags()

Testing: SegmentScorerTest:
* Change to use ScopedFeatureList. Now tests instantiate SegmentScorer
  with CreateFromFeatureFlags() instead of calling the CTOR.
* Add 1 new test.

(cherry picked from commit 3209cbe9)

Bug: 373852494
Fixed: 375238481
Change-Id: Ie59e53a1c6d8886fac2a34a4a55ae2be86264676
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5939073


Commit-Queue: Samuel Huang <huangs@chromium.org>
Reviewed-by: default avatarCalder Kitagawa <ckitagawa@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1369590}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5957890
Cr-Commit-Position: refs/branch-heads/6778@{#766}
Cr-Branched-From: b21671ca-refs/heads/main@{#1368529}
parent 6c6b2e31
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment