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
a046825a
Commit
a046825a
authored
Oct 10, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
a8b36770
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
evaluation_metrics.py
eda/smart_rank/evaluation_metrics.py
+10
-3
No files found.
eda/smart_rank/evaluation_metrics.py
View file @
a046825a
...
...
@@ -165,8 +165,15 @@ if __name__ == '__main__':
# 3级tag对应的2级tag
all_3tag_2tag
=
get_all_3tag_2tag
()
device_id
=
"9C5E7C73-380C-4623-8F48-A64C8034E315"
get_user_service_portrait_not_alipay
(
device_id
,
all_word_tags
,
all_tag_tag_type
,
all_3tag_2tag
)
# 昨天下单了的用户的美购tags(转成2级tags)
all_device_order_tags2
=
dict
()
for
device
in
all_device_order_tags
:
tags
=
all_device_order_tags
[
device
]
for
tag
in
tags
:
tags2
=
all_3tag_2tag
.
get
(
tag
,
[])
tags
+=
tags2
all_device_order_tags2
[
device
]
=
tags
# 昨天下单了的用户的去除支付行为的画像
all_device_portrait_result
=
dict
()
...
...
@@ -178,7 +185,7 @@ if __name__ == '__main__':
# 比较两个tag列表的重合率
cmd_portrait_top_n
=
int
(
sys
.
argv
[
1
])
cmd_coincide_n
=
int
(
sys
.
argv
[
2
])
result
=
get_2_tags_coincide_rate
(
all_device_order_tags
,
all_device_portrait_result
,
cmd_portrait_top_n
,
result
=
get_2_tags_coincide_rate
(
all_device_order_tags
2
,
all_device_portrait_result
,
cmd_portrait_top_n
,
cmd_coincide_n
)
print
(
"统计日期:"
,
my_yesterday
)
print
(
"画像的前n个tag:"
,
cmd_portrait_top_n
)
...
...
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