Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
754c7dc4
Commit
754c7dc4
authored
Dec 07, 2018
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计算基尼系数,新建object
parent
1e07f3e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Recommendation_strategy_all.scala
...src/main/scala/com/gmei/Recommendation_strategy_all.scala
+2
-2
No files found.
eda/feededa/src/main/scala/com/gmei/Recommendation_strategy_all.scala
View file @
754c7dc4
...
@@ -431,7 +431,7 @@ object Gini_coefficient {
...
@@ -431,7 +431,7 @@ object Gini_coefficient {
s
"""
s
"""
|select id as diary_id
|select id as diary_id
|from src_mimas_prod_api_diary
|from src_mimas_prod_api_diary
|where content_level >=
1
|where content_level >=
3.5
|and doctor_id is not null
|and doctor_id is not null
"""
.
stripMargin
"""
.
stripMargin
)
)
...
@@ -456,7 +456,7 @@ object Gini_coefficient {
...
@@ -456,7 +456,7 @@ object Gini_coefficient {
//统计次数
//统计次数
val
diary_clk_num
=
sc
.
sql
(
val
diary_clk_num
=
sc
.
sql
(
s
"""
s
"""
|select partition_date,temp1.diary_id as diary_id,count(ov.cl_id) as diary_clk_num
|select
ov.
partition_date,temp1.diary_id as diary_id,count(ov.cl_id) as diary_clk_num
|from online.tl_hdfs_maidian_view ov left join temp1
|from online.tl_hdfs_maidian_view ov left join temp1
|on params["business_id"]= temp1.diary_id
|on params["business_id"]= temp1.diary_id
|where ov.action="page_view"
|where ov.action="page_view"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment