|
@@ -269,6 +269,16 @@ public class RankStrategyBy688 extends RankStrategyBasic {
|
|
|
for (AdRankItem item : result) {
|
|
|
double originalScore = item.getLrScore();
|
|
|
double calibratedScore = originalScore / (originalScore + (1 - originalScore) / negSampleRate);
|
|
|
+ // 该创意尚未在模型中训练,打分不可靠
|
|
|
+ if (CollectionUtils.isNotEmpty(DnnCidDataHelper.getCidSet()) && !DnnCidDataHelper.getCidSet().contains(item.getAdId())) {
|
|
|
+ Map<String, Map<String, String>> cidFeature = allCidFeature.getOrDefault(String.valueOf(item.getAdId()), new HashMap<>());
|
|
|
+ Map<String, String> b3Feature = cidFeature.getOrDefault("alg_cid_feature_cid_action", new HashMap<>());
|
|
|
+ double view = Double.parseDouble(b3Feature.getOrDefault("ad_view_14d", "0"));
|
|
|
+ double conver = Double.parseDouble(b3Feature.getOrDefault("ad_conversion_14d", "0"));
|
|
|
+ double smoothCxr = NumUtil.divSmoothV1(conver, view, 1.64);
|
|
|
+ //模型打分和统计计算取打分更低的
|
|
|
+ calibratedScore = Math.min(smoothCxr, calibratedScore);
|
|
|
+ }
|
|
|
item.setLrScore(calibratedScore);
|
|
|
item.getScoreMap().put("originCtcvrScore", originalScore);
|
|
|
item.getScoreMap().put("ctcvrScore", calibratedScore);
|