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
5c289b71
Commit
5c289b71
authored
Aug 13, 2018
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update Top question data with have exposure data
parent
d6ceee4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
getRate.py
eda/recommended_indexs/code/getRate.py
+1
-1
getTop100Question.py
eda/recommended_indexs/code/getTop100Question.py
+1
-1
No files found.
eda/recommended_indexs/code/getRate.py
View file @
5c289b71
...
@@ -28,7 +28,7 @@ def result2file(fpath):
...
@@ -28,7 +28,7 @@ def result2file(fpath):
2.1 用户点击次数分布(第一列:用户点击次数;第二列:独立用户数量)
2.1 用户点击次数分布(第一列:用户点击次数;第二列:独立用户数量)
2.2 Top 100 diary (sorted by ctr)
2.2 Top 100 diary (sorted by ctr)
2.3 Top 100 Answer (sorted by ctr)
2.3 Top 100 Answer (sorted by ctr)
2.4 Top 100 Question (sorted by c
lick times
)
2.4 Top 100 Question (sorted by c
tr
)
...
...
eda/recommended_indexs/code/getTop100Question.py
View file @
5c289b71
...
@@ -21,7 +21,7 @@ def tuple2dict(tuple_result):
...
@@ -21,7 +21,7 @@ def tuple2dict(tuple_result):
def
result2file
(
result_lst
,
fpath
):
def
result2file
(
result_lst
,
fpath
):
with
open
(
fpath
,
'w'
)
as
f
:
with
open
(
fpath
,
'w'
)
as
f
:
tplt
=
"{0:
\u3000
<4}
\t
{1:
\u3000
<12}
\t
{2:
\u3000
^6}
\t
{3:
\u3000
^6}
\t
{4:
\u3000
<8}
\t
{5:
\u3000
^15}
\n
"
tplt
=
"{0:
\u3000
<4}
\t
{1:
\u3000
<12}
\t
{2:
\u3000
^6}
\t
{3:
\u3000
^6}
\t
{4:
\u3000
<8}
\t
{5:
\u3000
^15}
\n
"
f
.
write
(
"2.4 Top 100 Question
(曝光表里cid类型没有question,因此下面的曝光数和点击率都为0)
\n
"
)
f
.
write
(
"2.4 Top 100 Question
\n
"
)
f
.
write
(
"=================================================================
\n
"
)
f
.
write
(
"=================================================================
\n
"
)
f
.
write
(
tplt
.
format
(
"平台"
,
"question_id"
,
"点击数"
,
"曝光数"
,
"点击率"
,
"question链接"
))
f
.
write
(
tplt
.
format
(
"平台"
,
"question_id"
,
"点击数"
,
"曝光数"
,
"点击率"
,
"question链接"
))
for
i
in
result_lst
:
for
i
in
result_lst
:
...
...
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