Skip to content

Commit

Permalink
tweak rec sys
Browse files Browse the repository at this point in the history
  • Loading branch information
ohld committed Feb 10, 2024
1 parent 83727db commit bbbaa6f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/recommendations/candidates.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ async def sorted_by_user_source_lr_meme_lr_meme_age(
{exclude_meme_ids_sql_filter(exclude_meme_ids)}
ORDER BY -1
* COALESCE((UMSS.nlikes + 1) / (UMSS.ndislikes + 1), 0.5)
* COALESCE((MS.nlikes + 1) / (MS.ndislikes + 1), 0.5)
* COALESCE((UMSS.nlikes + 1) / (UMSS.nlikes + UMSS.ndislikes + 1), 0.5)
* COALESCE((MS.nlikes + 1) / (MS.nlikes + MS.ndislikes + 1), 0.5)
* CASE WHEN MS.raw_impr_rank < 1 THEN 1 ELSE 0.5 END
* CASE WHEN MS.age_days < 5 THEN 1 ELSE 0.5 END
* CASE WHEN M.caption IS NULL THEN 1 ELSE 0.8 END
LIMIT {limit}
"""
Expand Down

0 comments on commit bbbaa6f

Please sign in to comment.