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
16054827
Commit
16054827
authored
Sep 26, 2019
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change
parent
3b7c9de5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
ctr.py
tensnsorflow/ctr.py
+2
-0
No files found.
tensnsorflow/ctr.py
View file @
16054827
...
...
@@ -40,6 +40,8 @@ def get_feed_ctr():
df
=
df
.
rename
(
columns
=
{
0
:
"date_str"
,
1
:
"diary_exp"
,
2
:
"diary_click"
,
3
:
"post_exp"
,
4
:
"post_click"
,
5
:
"qa_exp"
,
6
:
"qa_click"
})
for
i
in
[
"date_str"
,
"diary_exp"
,
"diary_click"
,
"post_exp"
,
"post_click"
,
"qa_exp"
,
"qa_click"
]:
df
[
i
]
=
df
[
i
]
.
astype
(
"int"
)
df
[
"total_exp"
]
=
df
[
"diary_exp"
]
+
df
[
"post_exp"
]
+
df
[
"qa_exp"
]
df
[
"total_click"
]
=
df
[
"diary_click"
]
+
df
[
"post_click"
]
+
df
[
"qa_click"
]
df
[
"total_ctr"
]
=
df
[
"total_click"
]
/
df
[
"total_exp"
]
...
...
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