Bläddra i källkod

出广告逻辑判断

yangxiaohui 1 år sedan
förälder
incheckning
1b33fe04b0
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      ad_recommend.py

+ 3 - 3
ad_recommend.py

@@ -332,9 +332,9 @@ def predict_mid_video_res_with_model(now_date, mid, video_id, abtest_param, abte
     final_score, online_score = get_final_score(online_features, offline_score)
     threshold = float(redis_helper.get_data_from_redis(key_name=threshold_key))
 
-    # 阈值判断
-    if final_score > threshold:
-        # 于阈值,出广告
+    # 跳出率阈值判断
+    if final_score < threshold:
+        # 于阈值,出广告
         ad_predict = 2
     else:
         # 否则,不出广告