|
@@ -35,7 +35,7 @@ public class PredictServiceV2 {
|
|
|
|
|
|
// 没有特征为新用户,随机出广告
|
|
|
if (MapUtils.isEmpty(featureMap)) {
|
|
|
- double newUserShowAdRate = exp713Config.getOrDefault("newUserShowAdRate", 1d);
|
|
|
+ double newUserShowAdRate = exp713Config.getOrDefault("newUserShowAdRate", 0.8d);
|
|
|
double randomRate = Math.random();
|
|
|
if (randomRate < newUserShowAdRate) {
|
|
|
context.getLogParam().getScoreMap().put("newUserShowAdRate", newUserShowAdRate);
|
|
@@ -63,28 +63,31 @@ public class PredictServiceV2 {
|
|
|
double noShowAdShareRate = NumUtil.div((noShowAdSharePv + 1), (noShowAdClickPv + 1));
|
|
|
double returnDivShare = NumUtil.div((showAdNewReturnPv + noShowAdNewReturnPv + 1), (showAdSharePv + noShowAdSharePv + 1));
|
|
|
|
|
|
- double alpha = exp713Config.getOrDefault("alpha", 0.1d);
|
|
|
- score = singleReturnAdIncome + ((showAdShareRate - noShowAdShareRate) * returnDivShare * alpha);
|
|
|
+ double busDauBalanceRate = exp713Config.getOrDefault("busDauBalanceRate", 0.1d);
|
|
|
+ score = singleReturnAdIncome + ((showAdShareRate - noShowAdShareRate) * returnDivShare * busDauBalanceRate);
|
|
|
|
|
|
|
|
|
context.getLogParam().getScoreMap().put("singleReturnAdIncome", singleReturnAdIncome);
|
|
|
context.getLogParam().getScoreMap().put("showAdShareRate", showAdShareRate);
|
|
|
context.getLogParam().getScoreMap().put("noShowAdShareRate", noShowAdShareRate);
|
|
|
context.getLogParam().getScoreMap().put("returnDivShare", returnDivShare);
|
|
|
- context.getLogParam().getScoreMap().put("alpha", alpha);
|
|
|
+ context.getLogParam().getScoreMap().put("busDauBalanceRate", busDauBalanceRate);
|
|
|
|
|
|
}
|
|
|
double showAdScoreThreshold = exp713Config.getOrDefault("showAdScoreThreshold", 0d);
|
|
|
+ boolean isShowAd = score >= showAdScoreThreshold;
|
|
|
|
|
|
+ context.getLogParam().setAIsShowAd(isShowAd);
|
|
|
context.getLogParam().setExpId("713");
|
|
|
context.getLogParam().setScore(score);
|
|
|
context.getLogParam().getScoreMap().put("score", score);
|
|
|
context.getLogParam().getScoreMap().put("showAdScoreThreshold", showAdScoreThreshold);
|
|
|
|
|
|
+
|
|
|
logHubService.crowdChooseLogUpload(context);
|
|
|
|
|
|
|
|
|
- if (score >= showAdScoreThreshold) {
|
|
|
+ if (isShowAd) {
|
|
|
Map<String, Object> rtnMap = rtnAdPredict();
|
|
|
rtnMap.putAll(context.getLogParam().getScoreMap());
|
|
|
return rtnMap;
|