|
@@ -53,8 +53,9 @@ public class VideoAdThompsonScorerV2 {
|
|
|
}else {
|
|
|
statistic =gson.fromJson(jsonStr,CreativeStatistic.class);
|
|
|
score = (exp663Param.getOrDefault("alpha",1d)+Long.parseLong(statistic.getOrder()))
|
|
|
- / (exp663Param.getOrDefault("beta",10000d)+Long.parseLong(statistic.getExp())) *dto.getCpa();
|
|
|
+ / (exp663Param.getOrDefault("beta",10000d)+Long.parseLong(statistic.getExp())) ;
|
|
|
}
|
|
|
+ score=score*dto.getCpa()*dto.getBid1()*dto.getBid2();
|
|
|
item.setScore(score);
|
|
|
result.add(item);
|
|
|
}catch (Exception e){
|
|
@@ -88,8 +89,9 @@ public class VideoAdThompsonScorerV2 {
|
|
|
}else {
|
|
|
statistic =gson.fromJson(jsonStr,CreativeStatistic.class);
|
|
|
score = (exp664Param.getOrDefault("alpha",1d)+Long.parseLong(statistic.getOrder()))
|
|
|
- / (exp664Param.getOrDefault("beta",10000d)+Long.parseLong(statistic.getExp())) *dto.getCpa();
|
|
|
+ / (exp664Param.getOrDefault("beta",10000d)+Long.parseLong(statistic.getExp())) ;
|
|
|
}
|
|
|
+ score=score*dto.getCpa()*dto.getBid1()*dto.getBid2();
|
|
|
item.setScore(score);
|
|
|
result.add(item);
|
|
|
}catch (Exception e){
|
|
@@ -123,6 +125,7 @@ public class VideoAdThompsonScorerV2 {
|
|
|
score = betaSampler(exp665Param.getOrDefault("alpha",1d)+Long.parseLong(statistic.getOrder()) ,
|
|
|
exp665Param.getOrDefault("beta",100000d)+Long.parseLong(statistic.getExp())) *dto.getCpa();
|
|
|
}
|
|
|
+ score=score*dto.getCpa()*dto.getBid1()*dto.getBid2();
|
|
|
item.setScore(score);
|
|
|
result.add(item);
|
|
|
}catch (Exception e){
|
|
@@ -174,12 +177,12 @@ public class VideoAdThompsonScorerV2 {
|
|
|
score = betaSampler(exp666Param.getOrDefault("alpha",1d),exp666Param.getOrDefault("beta",100000d));
|
|
|
}
|
|
|
}
|
|
|
+ score=score*dto.getCpa()*dto.getBid1()*dto.getBid2();
|
|
|
item.setScore(score);
|
|
|
result.add(item);
|
|
|
}catch (Exception e){
|
|
|
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
Collections.sort(result);
|
|
|
return result;
|
|
@@ -229,19 +232,19 @@ public class VideoAdThompsonScorerV2 {
|
|
|
BetaDistribution betaSample = new BetaDistribution(alpha, beta);
|
|
|
return betaSample.sample();
|
|
|
}
|
|
|
- @Value("${ad.engine.new.thompson.V2.663:{}}")
|
|
|
+ @Value("${ad.engine.new.thompson.exp.V2.663:{\"randomMin\":0.000001,\"randomMax\":0.00001,\"alpha\":1,\"beta\":10000}}")
|
|
|
public void setExp663Param(String str){
|
|
|
this.exp663Param=gson.fromJson(str,Map.class);
|
|
|
}
|
|
|
- @Value("${ad.engine.new.thompson.V2.664:{}}")
|
|
|
+ @Value("${ad.engine.new.thompson.exp.V2.664:{}}")
|
|
|
public void setExp664Param(String str){
|
|
|
this.exp663Param=gson.fromJson(str,Map.class);
|
|
|
}
|
|
|
- @Value("${ad.engine.new.thompson.V2.665:{}}")
|
|
|
+ @Value("${ad.engine.new.thompson.exp.V2.665:{}}")
|
|
|
public void setExp665Param(String str){
|
|
|
this.exp663Param=gson.fromJson(str,Map.class);
|
|
|
}
|
|
|
- @Value("${ad.engine.new.thompson.V2.666:{}}")
|
|
|
+ @Value("${ad.engine.new.thompson.exp.V2.666:{}}")
|
|
|
public void setExp666Param(String str){
|
|
|
this.exp663Param=gson.fromJson(str,Map.class);
|
|
|
}
|