| 
					
				 | 
			
			
				@@ -307,7 +307,7 @@ def predict_mid_video_res_with_model(now_date, mid, video_id, abtest_param, abte 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         user_score = 0.0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if item_score is None: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         item_score = 0.0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    mid_video_predict_res = user_score + item_score 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    final_score = user_score + item_score 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     # 获取对应的阈值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     threshold_key_name_prefix = config_.KEY_NAME_PREFIX_AD_THRESHOLD 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -316,7 +316,7 @@ def predict_mid_video_res_with_model(now_date, mid, video_id, abtest_param, abte 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     threshold = 0.2 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     # 阈值判断 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if mid_video_predict_res > threshold: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if final_score > threshold: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         # 大于阈值,出广告 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ad_predict = 2 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     else: 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -325,6 +325,7 @@ def predict_mid_video_res_with_model(now_date, mid, video_id, abtest_param, abte 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     result = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         'user_score': user_score, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         'item_score': item_score, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        'final_score': final_score, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         'threshold': threshold, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         'ad_predict': ad_predict 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 |