feat(reco): tiered intent scores, TF-IDF genres, completion prediction, seen-proxy filter, household strict - #76
Merged
Conversation
…prediction, seen-proxy filter, household strict mode 1. analyticsEngine: track genreIntentScores / genreEngageScores / genreBrowseScores separately so watchlist/like/complete carry more weight than hover/browse. 2. recoScoring: use tiered genre maps when populated (intent×10, engage×4, browse×2); apply IDF weighting via catalogGenreFreqs so ubiquitous genres (Aventure, Comédie) are dampened relative to rare discriminating ones (Guerre, Histoire). 3. recoScoring: completion prediction — penalise long/epic content when avgCompletionRate is low, boost short content for poor completers, add late-night epic penalty. 4. media.ts: hard pre-filter for "probably already seen" titles using 75th-percentile actor score threshold (≥2 of top-3 cast qualify → skip candidate). 5. recoScoring: household strict — when lastClass='adult' and not a family moment, suppress kids genre blend entirely (zero, not just scaled down). 6. mediaStatsEngine: getCatalogGenreFreqs() with 30-min cache for IDF computation. https://claude.ai/code/session_01XcJo4UywxcJC2XmiRSy1Wm
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.
Résumé
5 améliorations au moteur de recommandation.
1. Scores de genre par niveau d'intention (
analyticsEngine.ts)Trois nouvelles maps dans
preferencesau lieu d'un compteur unique :genreIntentScores— WATCHLIST_ADD, MEDIA_LIKE, WATCH_COMPLETEgenreEngageScores— WATCH_START, MEDIA_PLAY_INTENT, MEDIA_DETAIL_ENGAGEMENT (>5s)genreBrowseScores— HOVER, MEDIA_VIEW, CARD_CLICK et tout le restegenreScoresreste inchangé. Les anciens profils basculent automatiquement sur le chemin fallback.2. Pondération IDF des genres (
recoScoring.ts+mediaStatsEngine.ts)getCatalogGenreFreqs()calcule la fréquence de chaque genre dans le catalogue (cache 30 min).log2(1 + 1/freq)plafonné à 3.5×.3. Prédiction de complétion (
recoScoring.ts)Nouveau signal
completionRisk/completionFit:avgCompletionRate× bucket runtime → pénalise long/epic si l'utilisateur abandonne systématiquement4. Filtre hard "déjà vu" (
media.ts)Exclut les candidats où ≥2 des 3 premiers acteurs ont un
actorScore≥ p75 du profil. Proxy de visionnage passé non tracké.5. Household strict (
recoScoring.ts)Quand
lastClass === 'adult'et que ce n'est pas un moment famille, le blend kids est à zéro absolu.Test plan
genreIntentScores(ancien) utilise le fallbackgenreScoresgetCatalogGenreFreqsretourne des fractions correcteslikelySeenne filtre rien quandactorP75 < 5(profil froid)https://claude.ai/code/session_01XcJo4UywxcJC2XmiRSy1Wm
Generated by Claude Code