|
@@ -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++) {
|