|
|
@@ -375,12 +375,18 @@ public class RankStrategy4RegionMergeModelV564 extends RankStrategy4RegionMergeM
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- /** 与 FeatureV6.oneTypeStatFeature 同口径:rovn = plusSmooth(return_n_uv, exp, plus, 1) */
|
|
|
+ /**
|
|
|
+ * 与 FeatureV6.oneTypeStatFeature 同口径:rovn = plusSmooth(return_n_uv, exp, plus, 1)
|
|
|
+ *
|
|
|
+ * 字段语义(区分 0 vs null):
|
|
|
+ * - exp 是 period 有效性 anchor:null 或 ≤0 → 整个 period 无效(return null)
|
|
|
+ * - return_n_uv 缺失视为 0(真实信号"无回访"):rovn=0,参与加权(不会让另一时段兜底)
|
|
|
+ */
|
|
|
private static Double computeRovn(Map<String, String> row, String period, double smoothPlus) {
|
|
|
Double exp = parseDoubleOrNull(row.get("exp_" + period));
|
|
|
+ if (exp == null || exp <= 0) return null;
|
|
|
Double returnNuv = parseDoubleOrNull(row.get("return_n_uv_" + period));
|
|
|
- if (exp == null || exp <= 0 || returnNuv == null || returnNuv <= 0) return null;
|
|
|
- return FeatureUtils.plusSmooth(returnNuv, exp, smoothPlus, 1);
|
|
|
+ return FeatureUtils.plusSmooth(returnNuv != null ? returnNuv : 0, exp, smoothPlus, 1);
|
|
|
}
|
|
|
|
|
|
private static Double parseDoubleOrNull(String s) {
|