User:Mconnor/Past/PlacesFrecency

From MozillaWiki
< User:Mconnor
Revision as of 20:21, 24 August 2007 by Mconnor (talk | contribs) (New page: The overhead of calculating frecency for each request is simply too high, as is the overhead of continuous recalculating frecency. So I would propose that we calculate a frecency rating v...)
Jump to navigation Jump to search

The overhead of calculating frecency for each request is simply too high, as is the overhead of continuous recalculating frecency. So I would propose that we calculate a frecency rating via one of the methods below, and at sort time apply the weighting based on the lastVisited date. Done right, this should just be integer math, and quite fast.

All ranges and weights should be tuned, this is a first-cut approximation.

Range 1: 0-4 days (Weight 1.0) Range 2: 5-14 days (Weight 0.7) Range 3: 15-31 days (Weight 0.5) Range 4: 32-90 days (Weight 0.3) Range 5: 91+ days (Weight 0.1)

Starred pages get a 40% bonus, bookmarks get a 100% bonus.

Option 1 (max overhead/great accuracy)

Each visit is worth 100 points. Calculate the total point value for each visit, the sum is the frecency rating.

Option 2 (lower overhead/good accuracy)

Each visit is worth 100 points. Divide the total points by the days since first visit to get the frecency rating.