Browse Source

Merge branch 'test' of https://git.yishihui.com/algorithm/rov-offline into test

caida 2 years ago
parent
commit
09ed4549e1
2 changed files with 6 additions and 1 deletions
  1. 5 0
      ad_video_data_update.py
  2. 1 1
      config.py

+ 5 - 0
ad_video_data_update.py

@@ -87,6 +87,11 @@ def predict_video_share_rate(video_initial_df, dt, data_key, data_param, top10_a
         redis_data[int(item['videoid'])] = item['video_ad_share_rate']
     group_ad_share_rate_mean = video_df['video_ad_share_rate'].mean()
     redis_data[-1] = group_ad_share_rate_mean
+    # 异常视频给定值:mean/3
+    if top10_abnormal_video_ids is not None:
+        for abnormal_video_id in top10_abnormal_video_ids:
+            print(abnormal_video_id, group_ad_share_rate_mean, group_ad_share_rate_mean/3)
+            redis_data[int(abnormal_video_id)] = group_ad_share_rate_mean / 3
     if len(redis_data) > 0:
         redis_helper = RedisHelper()
         redis_helper.add_data_with_zset(key_name=key_name, data=redis_data, expire_time=2 * 24 * 3600)

+ 1 - 1
config.py

@@ -1060,7 +1060,7 @@ class BaseConfig(object):
         APP_TYPE['LOVE_LIVE']: {
             'ab_test_id': '194',
             'not_update': 0.01,
-            'gradient': 0.05,
+            'gradient': 0.07,
             'max_update_step': 5,
             'threshold_update': {
                 'ab0': 1 / 48,