Repository navigation
fix(recommendations): spend a variety rung per completion, not per genre - #249
Merged
Merged
Conversation
The variety ladder advanced a rung for every genre cluster it saw, so one finished title carrying six clusters filled all five rungs and nothing finished before it reached the ladder. Which cluster took the top penalty fell out of sorting them alphabetically. On a library where the last book read was an adventure comedy fantasy post-apocalyptic litrpg, that put the heaviest penalty on the broadest cluster in the vocabulary, sitting on a tenth of the shelf, while the sharpest one fell off the ladder and paid nothing. The next book in a series being actively read sat 200 places down behind it. A completion now owns one rung and every cluster it reaches shares that rung, so five rungs span five completions and no genre escapes on a technicality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The variety ladder is meant to hold your five most recent completions, so the recommender stops marching through a genre you just finished. It advanced a rung for every genre cluster instead, so one title carrying six clusters filled all five rungs on its own and nothing finished before it ever reached the ladder.
Which cluster got the heaviest penalty fell out of sorting them alphabetically.
On a real library that put the top penalty on the broadest cluster in the vocabulary — one sitting on a tenth of the shelf — while the sharpest cluster from the same book fell off the end of the ladder and paid nothing at all. The next book in a series being actively read, the highest-scoring unread book on the shelf, sat 200 places down behind that penalty. The title that took its place was there because its genre sorted last in the alphabet.
A completion now owns one rung, and every cluster it reaches shares that rung. Five rungs span five completions, a cluster on two completions keeps the fresher one's rung, and a completion whose clusters are all on the ladder already spends none.
Verify
command make check, thenrecommend --type book --count 20— the top of the list should reflect what you have actually been reading rather than which genre sorts first.