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
85b24375
Commit
85b24375
authored
Dec 06, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add stat_device_order_portrait_score_1106_1206
parent
f837f92e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
stat_device_order_portrait_score.py
eda/smart_rank/stat_device_order_portrait_score.py
+3
-4
No files found.
eda/smart_rank/stat_device_order_portrait_score.py
View file @
85b24375
...
...
@@ -24,6 +24,7 @@ def get_user_service_portrait(x, all_word_tags, all_tag_tag_type, all_3tag_2tag,
pay_time
=
x
[
0
]
cl_id
=
x
[
1
]
order_tag_id
=
x
[
2
]
order_tag_id_score
=
0.0
user_df_service
=
get_user_log
(
cl_id
,
all_word_tags
,
pay_time
=
pay_time
)
# 增加df字段(days_diff_now, tag_type, tag2)
...
...
@@ -55,12 +56,10 @@ def get_user_service_portrait(x, all_word_tags, all_tag_tag_type, all_3tag_2tag,
)
gmkv_tag_score2_sum
=
tag_score_sum
[[
"tag2"
,
"tag_score"
]][:
size
]
.
to_dict
(
'record'
)
gmkv_tag_score2_sum_dict
=
{
i
[
"tag2"
]:
i
[
"tag_score"
]
for
i
in
gmkv_tag_score2_sum
}
order_tag_id_score
=
gmkv_tag_score2_sum_dict
.
get
(
int
(
order_tag_id
),
0
)
if
not
portrait_result
:
order_tag_id_score
=
0
order_tag_id_score
=
gmkv_tag_score2_sum_dict
.
get
(
int
(
order_tag_id
),
0.0
)
return
pay_time
,
cl_id
,
order_tag_id
,
order_tag_id_score
else
:
return
pay_time
,
cl_id
,
order_tag_id
,
0
return
pay_time
,
cl_id
,
order_tag_id
,
0
.0
# 获取近一个月设备下单的时间、设备id、标签id
...
...
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