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
c27e5469
Commit
c27e5469
authored
Aug 09, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.wanmeizhensuo.com:ML/ffm-baseline
change sql for test
parents
df3f5c33
33194fdf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
getTopFeatures.py
eda/test/getTopFeatures.py
+16
-16
No files found.
eda/test/getTopFeatures.py
View file @
c27e5469
...
...
@@ -113,22 +113,22 @@ class TopFeatures(object):
def
main
():
top_answer_all
=
TopFeatures
(
1
,
"all"
,
"answer"
,
100
)
clk_answer_times_all
=
top_answer
.
get_click_times
()
imp_answer_times_all
=
top_answer
.
get_impression_times
()
clk_answer_ctr_all
=
top_answer
.
get_result
(
clk_answer_times_all
,
imp_answer_times_all
,
4
,
"ctr"
)
top_answer_
all
=
TopFeatures
(
1
,
"ios"
,
"answer"
,
100
)
clk_answer_times_ios
=
top_answer
.
get_click_times
()
imp_answer_times_ios
=
top_answer
.
get_impression_times
()
clk_answer_ctr_ios
=
top_answer
.
get_result
(
clk_answer_times_ios
,
imp_answer_times_ios
,
4
,
"ctr"
)
top_answer_a
ll
=
TopFeatures
(
1
,
"android"
,
"answer"
,
100
)
clk_answer_times_android
=
top_answer
.
get_click_times
()
imp_answer_times_android
=
top_answer
.
get_impression_times
()
clk_answer_ctr_android
=
top_answer
.
get_result
(
clk_answer_times_android
,
imp_answer_times_android
,
4
,
"ctr"
)
result_lst
=
[
clk_
diary_ctr_all
,
clk_diary_ctr_ios
,
clk_diary
_ctr_android
]
output_path
=
DIRECTORY_PATH
+
"top100_ctr_
diary_
%
s
.txt"
.
format
(
get_yesterday_date
())
clk_answer_times_all
=
top_answer
_all
.
get_click_times
()
imp_answer_times_all
=
top_answer
_all
.
get_impression_times
()
clk_answer_ctr_all
=
top_answer
_all
.
get_result
(
clk_answer_times_all
,
imp_answer_times_all
,
4
,
"ctr"
)
top_answer_
ios
=
TopFeatures
(
1
,
"ios"
,
"answer"
,
100
)
clk_answer_times_ios
=
top_answer
_ios
.
get_click_times
()
imp_answer_times_ios
=
top_answer
_ios
.
get_impression_times
()
clk_answer_ctr_ios
=
top_answer
_ios
.
get_result
(
clk_answer_times_ios
,
imp_answer_times_ios
,
4
,
"ctr"
)
top_answer_a
ndroid
=
TopFeatures
(
1
,
"android"
,
"answer"
,
100
)
clk_answer_times_android
=
top_answer
_android
.
get_click_times
()
imp_answer_times_android
=
top_answer
_android
.
get_impression_times
()
clk_answer_ctr_android
=
top_answer
_android
.
get_result
(
clk_answer_times_android
,
imp_answer_times_android
,
4
,
"ctr"
)
result_lst
=
[
clk_
answer_ctr_all
,
clk_answer_ctr_ios
,
clk_answer
_ctr_android
]
output_path
=
DIRECTORY_PATH
+
"top100_ctr_
answer_{}
.txt"
.
format
(
get_yesterday_date
())
top_answer_all
.
result2file
(
result_lst
,
output_path
)
...
...
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