|
@@ -64,6 +64,41 @@ public class VlogMergeEcpmScorer extends BaseLRModelScorer {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+// public void callMergeScore(AdRankItem item,CountDownLatch countDownLatch){
|
|
|
|
+// try {
|
|
|
|
+//// boolean isTfType=item.getItemFeature().getCreative_7day_cnt_features().getAdView()<5000;
|
|
|
|
+//// double pctr = isTfType?item.getTf_ctr():item.getCtr();
|
|
|
|
+//// double pcvr = isTfType?item.getTf_cvr():item.getCvr();
|
|
|
|
+// double cpa = item.getCpa();
|
|
|
|
+// double bid1 = item.getBid1();
|
|
|
|
+// double bid2 = item.getBid2();
|
|
|
|
+// double pctr = item.getCtr();
|
|
|
|
+// double pcvr = item.getCvr();
|
|
|
|
+//// item.setScore_type( isTfType?1:0);
|
|
|
|
+// item.setScore_type( 0);
|
|
|
|
+// //todo
|
|
|
|
+// double ecpm;
|
|
|
|
+//// if(isTfType){
|
|
|
|
+//// ecpm = cpa * bid1 * bid2 * pcvr * pctr * 1000d;
|
|
|
|
+//// }else {
|
|
|
|
+// cpa=cpa*item.getPidLambda();
|
|
|
|
+// if(cpa<0.5){
|
|
|
|
+// cpa=0.5;
|
|
|
|
+// }
|
|
|
|
+// ecpm = cpa* bid1 * bid2 * pcvr * pctr * 1000d;
|
|
|
|
+//// }
|
|
|
|
+//// ecpm = cpa * bid1 * bid2 * pcvr * pctr * 1000d;
|
|
|
|
+// item.setEcpm1(ecpm/1000d);
|
|
|
|
+// item.setScore(ecpm/1000d);
|
|
|
|
+// } catch (Exception e) {
|
|
|
|
+// LOGGER.error("merge Ecpm Score: {} error", "");
|
|
|
|
+// item.setScore(0.0);
|
|
|
|
+// }finally {
|
|
|
|
+// countDownLatch.countDown();
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+
|
|
public void callMergeScore(AdRankItem item,CountDownLatch countDownLatch){
|
|
public void callMergeScore(AdRankItem item,CountDownLatch countDownLatch){
|
|
try {
|
|
try {
|
|
// boolean isTfType=item.getItemFeature().getCreative_7day_cnt_features().getAdView()<5000;
|
|
// boolean isTfType=item.getItemFeature().getCreative_7day_cnt_features().getAdView()<5000;
|
|
@@ -78,18 +113,17 @@ public class VlogMergeEcpmScorer extends BaseLRModelScorer {
|
|
item.setScore_type( 0);
|
|
item.setScore_type( 0);
|
|
//todo
|
|
//todo
|
|
double ecpm;
|
|
double ecpm;
|
|
|
|
+ double ecpm1;
|
|
// if(isTfType){
|
|
// if(isTfType){
|
|
// ecpm = cpa * bid1 * bid2 * pcvr * pctr * 1000d;
|
|
// ecpm = cpa * bid1 * bid2 * pcvr * pctr * 1000d;
|
|
// }else {
|
|
// }else {
|
|
- cpa=cpa*item.getPidLambda();
|
|
|
|
- if(cpa<0.5){
|
|
|
|
- cpa=0.5;
|
|
|
|
- }
|
|
|
|
ecpm = cpa* bid1 * bid2 * pcvr * pctr * 1000d;
|
|
ecpm = cpa* bid1 * bid2 * pcvr * pctr * 1000d;
|
|
|
|
+ ecpm1 = item.getPidLambda()* bid1 * bid2 * pcvr * pctr * 1000d;
|
|
// }
|
|
// }
|
|
// ecpm = cpa * bid1 * bid2 * pcvr * pctr * 1000d;
|
|
// ecpm = cpa * bid1 * bid2 * pcvr * pctr * 1000d;
|
|
item.setEcpm1(ecpm/1000d);
|
|
item.setEcpm1(ecpm/1000d);
|
|
item.setScore(ecpm/1000d);
|
|
item.setScore(ecpm/1000d);
|
|
|
|
+ item.setEcpm2(ecpm1/1000d);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
LOGGER.error("merge Ecpm Score: {} error", "");
|
|
LOGGER.error("merge Ecpm Score: {} error", "");
|
|
item.setScore(0.0);
|
|
item.setScore(0.0);
|