Browse Source

ros扩展video属性特征

jch 2 tháng trước cách đây
mục cha
commit
4d81c67b89

+ 3 - 0
src/main/scala/com/aliyun/odps/spark/examples/makedata_recsys_r_rate/makedata_recsys_61_originData_20241209.scala

@@ -209,6 +209,7 @@ object makedata_recsys_61_originData_20241209 {
                 var r_rate = if (featData.isEmpty) 0D else featData.getDoubleValue("r_rate_" + period)
                 var r_cnt4s = if (featData.isEmpty) 0D else featData.getDoubleValue("r_cnt4s_" + period)
                 var str = if (featData.isEmpty) 0D else featData.getDoubleValue("str_" + period)
+                var s2r_rate = 0D
                 if (smoothPlus > 0) {
                   ros = RankExtractorFeature_20240530.smoothDiv(return_, share, smoothPlus)
                   rov = RankExtractorFeature_20240530.smoothDiv(return_, view, smoothPlus)
@@ -216,6 +217,7 @@ object makedata_recsys_61_originData_20241209 {
                   r_rate = RankExtractorFeature_20240530.smoothDiv(view_hasreturn, view, smoothPlus)
                   r_cnt4s = RankExtractorFeature_20240530.smoothDiv(return_, share_hasreturn, smoothPlus)
                   str = RankExtractorFeature_20240530.smoothDiv(share, view, smoothPlus)
+                  s2r_rate = RankExtractorFeature_20240530.smoothDiv(share_hasreturn, share, smoothPlus)
                 }
 
                 // scale
@@ -236,6 +238,7 @@ object makedata_recsys_61_originData_20241209 {
                 featureMap.put(featType + "_" + period + "_" + "r_rate", r_rate)
                 featureMap.put(featType + "_" + period + "_" + "r_cnt4s", r_cnt4s)
                 featureMap.put(featType + "_" + period + "_" + "str", str)
+                featureMap.put(featType + "_" + period + "_" + "s2r_rate", s2r_rate)
               }
             }