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
a99efd7d
Commit
a99efd7d
authored
Aug 21, 2018
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update output format
parent
c8a1b61c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
func.py
eda/recommended_indexs_v2/func.py
+1
-1
main.py
eda/recommended_indexs_v2/main.py
+12
-7
No files found.
eda/recommended_indexs_v2/func.py
View file @
a99efd7d
...
...
@@ -78,7 +78,7 @@ def get_click_zero_uid_rate_detail(platform):
dct2
=
get_register_uid_count
()
result
=
{}
for
k
in
dct1
:
result
[
k
]
=
dct1
[
k
]
/
dct2
[
k
]
result
[
k
]
=
round
(
dct1
[
k
]
/
dct2
[
k
],
4
)
return
result
...
...
eda/recommended_indexs_v2/main.py
View file @
a99efd7d
...
...
@@ -168,11 +168,16 @@ def result2file():
f
.
write
(
line
)
f
.
write
(
'
\n
'
)
f
.
write
(
"#1.8无点击用户数分布(=无点击用户∩激活用户 / 激活用户数) #注意:(]里面的数字指的是距离当前时间的天数
\n
"
)
f
.
write
(
"平台"
+
'
\t
'
+
"0-7"
+
'
\t
'
+
"7-14"
+
'
\t
'
+
\
"14-30"
+
'
\t
'
+
"30-60"
+
'
\t
'
+
"60-90"
+
'
\t
'
+
"90+"
+
'
\n
'
)
f
.
write
(
"平台"
+
'
\t
\t
'
+
"0-7"
+
'
\t\t
'
+
"7-14"
+
'
\t
\t
'
+
\
"14-30"
+
'
\t
\t
'
+
"30-60"
+
'
\t\t
'
+
"60-90"
+
'
\t
\t
'
+
"90+"
+
'
\n
'
)
for
i
in
click_zero_uid_detail_result
:
f
.
write
(
i
[
"platform"
]
+
'
\t
'
+
str
(
i
[
"0-7"
])
+
'
\t
'
+
str
(
i
[
"7-14"
])
+
'
\t
'
+
str
(
i
[
"14-30"
])
+
\
'
\t
'
+
str
(
i
[
"30-60"
])
+
'
\t
'
+
str
(
i
[
"60-90"
])
+
'
\t
'
+
str
(
i
[
"90+"
])
+
'
\n
'
)
f
.
write
(
i
[
"platform"
]
+
'
\t\t
'
+
\
"{}
%
"
.
format
(
round
(
i
[
"0-7"
]
*
100
,
2
))
+
'
\t\t
'
+
\
"{}
%
"
.
format
(
round
(
i
[
"7-14"
]
*
100
,
2
))
+
'
\t\t
'
+
\
"{}
%
"
.
format
(
round
(
i
[
"14-30"
]
*
100
,
2
))
+
'
\t\t
'
+
\
"{}
%
"
.
format
(
round
(
i
[
"30-60"
]
*
100
,
2
))
+
'
\t\t
'
+
\
"{}
%
"
.
format
(
round
(
i
[
"60-90"
]
*
100
,
2
))
+
'
\t\t
'
+
\
"{}
%
"
.
format
(
round
(
i
[
"90+"
]
*
100
,
2
))
+
'
\n
'
)
f
.
write
(
'
\n\n\n
'
)
#==========================================================================================
tplt
=
"{0:^10}
\t
{1:^10}
\n
"
...
...
@@ -192,7 +197,7 @@ def result2file():
f
.
write
(
header
)
for
i
in
top_diary_result
:
for
j
in
i
:
f
.
write
(
tplt
.
format
(
j
[
0
],
j
[
1
],
j
[
2
],
j
[
3
],
j
[
4
]
,
j
[
5
]))
f
.
write
(
tplt
.
format
(
j
[
0
],
j
[
1
],
j
[
2
],
j
[
3
],
"{}
%
"
.
format
(
round
(
j
[
4
]
*
100
,
2
))
,
j
[
5
]))
f
.
write
(
sep
)
if
i
!=
top_diary_result
[
-
1
]:
f
.
write
(
header
)
...
...
@@ -204,7 +209,7 @@ def result2file():
f
.
write
(
header
)
for
i
in
top_answer_result
:
for
j
in
i
:
f
.
write
(
tplt
.
format
(
j
[
0
],
j
[
1
],
j
[
2
],
j
[
3
],
j
[
4
]
,
j
[
5
]))
f
.
write
(
tplt
.
format
(
j
[
0
],
j
[
1
],
j
[
2
],
j
[
3
],
"{}
%
"
.
format
(
round
(
j
[
4
]
*
100
,
2
))
,
j
[
5
]))
f
.
write
(
sep
)
if
i
!=
top_answer_result
[
-
1
]:
f
.
write
(
header
)
...
...
@@ -216,7 +221,7 @@ def result2file():
f
.
write
(
header
)
for
i
in
top_question_result
:
for
j
in
i
:
f
.
write
(
tplt
.
format
(
j
[
0
],
j
[
1
],
j
[
2
],
j
[
3
],
j
[
4
]
,
j
[
5
]))
f
.
write
(
tplt
.
format
(
j
[
0
],
j
[
1
],
j
[
2
],
j
[
3
],
"{}
%
"
.
format
(
round
(
j
[
4
]
*
100
,
2
))
,
j
[
5
]))
f
.
write
(
sep
)
if
i
!=
top_question_result
[
-
1
]:
f
.
write
(
header
)
...
...
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