Commit 168fd350 authored by 王志伟's avatar 王志伟

统计推荐日记重复指标

parent 94d8043e
......@@ -219,7 +219,7 @@ object Repeated_content_recommendation {
val exp_diary = sc.sql(
s"""
|select concat_ws('|',device_id,cid_id)
|from data_feed_exposure_precise
|from data_feed_exposure
|where cid_type = 'diary'
|and device_id not in (select device_id from blacklist)
|and stat_date ='${stat_date}'
......@@ -230,7 +230,9 @@ object Repeated_content_recommendation {
.sortBy(_._2,false)
val more_than2=get_result.filter(_._2 >=2).map(_._2).reduce((x,y)=>x+y)
println(more_than2)
val all =get_result.map(_._2).reduce((x,y)=>x+y)
println(all)
val repeated_rate=more_than2/all
println(repeated_rate)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment