chore: lowered chance of overcoming limits

This commit is contained in:
ITQ
2025-02-22 09:28:26 +03:00
parent 06d95c783d
commit d261d3185d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -178,7 +178,7 @@ I cache every mlscore in redis (btw, on startup of docker compose i upload each
Here is how suggesting algotitm looks like: Here is how suggesting algotitm looks like:
1. Filter all campaigns and left only that currently active and matches user targeting. 1. Filter all campaigns and left only that currently active and matches user targeting.
2. Filter all campaigns with exceeded impressions, but to make more money i let exceed limit by 10% with chance 40% 2. Filter all campaigns with exceeded impressions, but to make more money i let exceed limit by 10% with chance 25%
3. Creating metrics for each campaign 3. Creating metrics for each campaign
1. Profit: cost_per_impression (=0 if already viewed), cost_per_click (=0 if already clicked) 1. Profit: cost_per_impression (=0 if already viewed), cost_per_click (=0 if already clicked)
2. Mlscores: from cache 2. Mlscores: from cache
@@ -344,7 +344,7 @@ class Campaign(BaseModel):
profit_values = [] profit_values = []
exceed_impressions_chance = ( # oh, can i just skip commenting this? exceed_impressions_chance = ( # oh, can i just skip commenting this?
*(0 for i in range(3)), *(0 for i in range(3)),
*(1 for i in range(2)), *(1 for i in range(1)),
) )
for campaign in campaigns: for campaign in campaigns: