Przeglądaj źródła

Merge branch 'dev-xym-add-PAI' into pre-master

xueyiming 3 miesięcy temu
rodzic
commit
e3f4d259b7

+ 2 - 2
ad-engine-commons/src/main/java/com/tzld/piaoquan/ad/engine/commons/score/model/PAIModelV1.java

@@ -47,7 +47,7 @@ public class PAIModelV1 {
     };
 
     private final String[] userFeatures = {
-            "viewall", "clickall", "converall", "incomeall", "ctr_all", "ctcvr_all", "cvr_all"
+            "viewAll", "clickAll", "converAll", "incomeAll", "ctr_all", "ctcvr_all", "cvr_all"
     };
 
     private final String[] itemFeatures = {
@@ -77,7 +77,7 @@ public class PAIModelV1 {
             for (String feature : userFeatures) {
                 String key = feature.replace("_x_", "*").replace("_view", "(view)");
                 double v = NumberUtils.toDouble(userFeatureMap.getOrDefault(key, "0.0"), 0.0);
-                request.addFeed(feature, TFDataType.DT_DOUBLE, new long[]{1}, new double[]{v});
+                request.addFeed(feature.toLowerCase(), TFDataType.DT_DOUBLE, new long[]{1}, new double[]{v});
             }
             Map<String, double[]> feed = new HashMap<>();
             for (int i = 0; i < items.size(); i++) {