Forráskód Böngészése

增加从实验参数中获取阈值功能 未获取情况下使用全局阈值

gufengshou1 1 éve
szülő
commit
45c0964cfe

+ 2 - 1
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/model/threshold/ScoreV2ThresholdPredictModel.java

@@ -101,7 +101,8 @@ public class ScoreV2ThresholdPredictModel extends ThresholdPredictModel {
         }
         if(maxItem != null){
             ThresholdModelContainer.mergingDigestAddScore(maxItem.getScore());
-            log.info("svc=ScoreV2ThresholdPredictModel_predict modelName=ScoreV2ThresholdPredictModel ctr={} cvr={} str={} ros={} breakRate={}", maxItem.getCtr(),maxItem.getCvr(),maxItem.getStr(),maxItem.getRos(),maxItem.getBreakRate());
+            log.info("svc=ScoreV2ThresholdPredictModel_predict modelName=ScoreV2ThresholdPredictModel maxItem={} extraParam={}",
+                    JSONObject.toJSONString(maxItem), JSONObject.toJSONString(scoreParam.getExtraParam()));
         }
 
         Map<String, Object> result = new HashMap<>();

+ 0 - 7
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/score/VlogMergeBreakScorer.java

@@ -44,13 +44,6 @@ public class VlogMergeBreakScorer extends BaseLRModelScorer {
             BigDecimal ctrCvr = new BigDecimal(Math.pow(70 * ctr * cvr, a));
             BigDecimal strRos = new BigDecimal(Math.pow(str * ros, b));
             BigDecimal breakRate = new BigDecimal(Math.pow(item.getBreakRate(), c));
-            try {
-                log.info("svc=scoring modelName=modelV2 a={} b={} c={} ctr={} cvr={} str={} ros={}",
-                        a,b,c,
-                        item.getCtr(),item.getCvr(),item.getStr(),item.getRos());
-            }catch (Exception e){
-
-            }
             BigDecimal score = ctrCvr.divide(strRos.multiply(breakRate), 5, BigDecimal.ROUND_HALF_UP);
 
             item.setScore(score.doubleValue());