Commit 56d3e094 authored by 张彦钊's avatar 张彦钊

Merge branch 'master' of git.wanmeizhensuo.com:ML/ffm-baseline

修改模型训练参数num_epochs
parents c1757fcc b15d0eea
...@@ -756,7 +756,7 @@ object find_reason { ...@@ -756,7 +756,7 @@ object find_reason {
val all_clk = sc.sql( val all_clk = sc.sql(
s""" s"""
|select '${stat_date}' as stat_date,ov.cl_id as device_id |select ov.cl_id as device_id
|from online.tl_hdfs_maidian_view ov left join agency_id |from online.tl_hdfs_maidian_view ov left join agency_id
|on ov.cl_id = agency_id.device_id |on ov.cl_id = agency_id.device_id
|where ov.action = 'on_click_diary_card' |where ov.action = 'on_click_diary_card'
...@@ -771,10 +771,9 @@ object find_reason { ...@@ -771,10 +771,9 @@ object find_reason {
//1.当天老用户中的点击用户数 //1.当天老用户中的点击用户数
val old_clk_count = sc.sql( val old_clk_count = sc.sql(
s""" s"""
|select '${stat_date}' as stat_date,count(oc.device_id) as old_clk_count |select '${stat_date}' as stat_date,count(distinct(oc.device_id)) as old_clk_count
|from all_clk_diary_card oc inner join device_id_old |from all_clk_diary_card oc inner join device_id_old
|on oc.device_id = device_id_old.device_id |on oc.device_id = device_id_old.device_id
|group by stat_date
""".stripMargin """.stripMargin
) )
old_clk_count.show() old_clk_count.show()
...@@ -793,10 +792,9 @@ object find_reason { ...@@ -793,10 +792,9 @@ object find_reason {
//2.当天新用户中的点击用户数 //2.当天新用户中的点击用户数
val new_clk_count = sc.sql( val new_clk_count = sc.sql(
s""" s"""
|select '${stat_date}' as stat_date,count(oc.device_id) as new_clk_count |select '${stat_date}' as stat_date,count(distinct(oc.device_id)) as new_clk_count
|from all_clk_diary_card oc inner join device_id_new |from all_clk_diary_card oc inner join device_id_new
|on oc.device_id = device_id_new.device_id |on oc.device_id = device_id_new.device_id
|group by stat_date
""".stripMargin """.stripMargin
) )
//2.1 有点击的新用户 //2.1 有点击的新用户
...@@ -815,8 +813,9 @@ object find_reason { ...@@ -815,8 +813,9 @@ object find_reason {
val old_count = sc.sql( val old_count = sc.sql(
s""" s"""
|select '${stat_date}' as stat_date,count(distinct(dio.device_id)) as old_count |select '${stat_date}' as stat_date,count(distinct(dio.device_id)) as old_count
|from device_id_old dio inner join agency_id |from device_id_old dio left join agency_id
|on dio.device_id = agency_id.device_id |on dio.device_id = agency_id.device_id
|where agency_id.device_id is null
""".stripMargin """.stripMargin
) )
...@@ -824,8 +823,9 @@ object find_reason { ...@@ -824,8 +823,9 @@ object find_reason {
val new_count = sc.sql( val new_count = sc.sql(
s""" s"""
|select '${stat_date}' as stat_date,count(distinct(din.device_id)) as new_count |select '${stat_date}' as stat_date,count(distinct(din.device_id)) as new_count
|from device_id_new din inner join agency_id |from device_id_new din left join agency_id
|on din.device_id = agency_id.device_id |on din.device_id = agency_id.device_id
|where agency_id.device_id is null
""".stripMargin """.stripMargin
) )
......
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