Activity metric score should include lack of badge as a factor in calculation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Here's the use case.
A system has created three activity metric badges to identify popular materials in their collection: one badge for titles owned by the most org units, one for most current holds, and one for most circs over time.
The video game, Harry Potter Lego, gets a score of five for the most org units badge, but does not get a badge for holds or circs.
The book, Harry Potter & the Deathly Hallows, gets all three badges. It scores 5 on the org units badge, a 1 on most current holds, and a 4 on holds over time.
Clearly, the Harry Potter book is the title that should be getting the highest score. However, the way we calculate the total activity score is to only average the badges that were earned and discounting the badges that were not earned.
Therefore, Harry Potter Lego gets a score of 5 and ends up getting bumped ahead of Harry Potter & the Deathly Hallows, which gets a score of 3.3. Note: I do know the calculation is not just averaging these scores, but I'm saying 'average' for the sake of simplicity.
After using the activity metric for over a year now, we've found that this method of calculating the total score is frequently pushing up materials with less activity above those that are truly popular. It would be better if the system assigned a zero to any badge that did not get earned by the record, so that the final score looked more like:
Lego Harry Potter: 1.6
Harry Potter and the Deathly Hallows: 3.3
Changed in evergreen: | |
assignee: | nobody → Michele Morgan (mmorgan) |
tags: |
added: badges removed: activity |
no longer affects: | evergreen/3.1 |
no longer affects: | evergreen/master |
no longer affects: | evergreen/3.2 |
Here is a patch that changes the badge score calculation to include all applicable badges for the search when averaging the scores.
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ mmorgan/ lp1796176_ use_all_ badges_ in_scope_ to_calculate_ total_score
Current behavior calculates total score by taking the sum of (badge weight * badge score) for all earned badges and dividing that by the sum of badge weight for *all earned badges*
The patch changes the calculation to take the sum of (badge weight * badge score) for all earned badges and dividing that by the sum of badge weight for *all badges in the scope*
Without this patch, for a scenario similar to Kathy's use case above, total scores would be calculated as follows:
Assuming the following badges and weights:
Badge: Circs over time, weight: 1
Badge: Ownership, weight: 2
Badge: Holds over time, weight 3
For Harry Potter Lego, with badge and score:
Ownership:5
The calculation for total score would be:
5*2/2 = 5
For Harry Potter and the Deathly Hallows with badges and scores:
Circs over time:3
Ownership:5
Holds over time:1
The calculation for total score would be:
(3*1+5* 2+1*3)/ (1+2+3) = 2.7
After applying the patch, the total score for Harry Potter and the Deathly Hallows would still be 2.7, but Harry Potter Lego's score would calculate as follows:
5*2/(1+2+3) = 1.67
So the clearly more popular item now gets the higher total score.