|
@@ -47,7 +47,7 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
@ApolloJsonValue("${alpha:1.0}")
|
|
|
protected Double alpha;
|
|
|
|
|
|
- @Value("${calibration:ctcvr.exp:779}")
|
|
|
+ @Value("${calibration.ctcvr.exp:779}")
|
|
|
protected String calibrationCtcvrExp;
|
|
|
|
|
|
@Value("${correct.cpa.exp.1:}")
|
|
@@ -559,9 +559,8 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
List<String> redisKeys = cidList.stream()
|
|
|
.map(cid -> cidLayerClassKey.replace("{cid}", cid.toString()))
|
|
|
.collect(Collectors.toList());
|
|
|
- log.info("calibrationCtcvrScore redisKeys={}", redisKeys);
|
|
|
+
|
|
|
List<String> redisValues = algRedisHelper.mget(redisKeys);
|
|
|
- log.info("calibrationCtcvrScore redisValues={}", redisValues);
|
|
|
Map<Long, CorrectCtcvrScoreParam> calibrationMap = parseRedisValues(cidList, redisValues);
|
|
|
|
|
|
// 4. 应用校准逻辑
|
|
@@ -603,7 +602,6 @@ public abstract class RankStrategyBasic implements RankStrategy {
|
|
|
double realCtcvr = Optional.ofNullable(param.getRealCtcvr()).orElse(0.0);
|
|
|
double calibratedScore = item.getLrScore() * calibrationAlpha + (1 - calibrationAlpha) * realCtcvr;
|
|
|
item.getExt().put("correctCtcvrScoreParam", JSONObject.toJSONString(param));
|
|
|
- item.getScoreMap().put("lrScore()", item.getLrScore());
|
|
|
item.getScoreMap().put("ctcvrScore", calibratedScore);
|
|
|
item.getScoreMap().put("realCtcvr", realCtcvr);
|
|
|
item.setLrScore(calibratedScore);
|