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
4adad597
Commit
4adad597
authored
Aug 10, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.wanmeizhensuo.com:ML/ffm-baseline
change redis function for test
parents
bcb893e9
8ced0dee
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
4 deletions
+11
-4
vcs.xml
.idea/vcs.xml
+7
-0
getClickTimes2CountUid.py
eda/recommended_indexs/code/getClickTimes2CountUid.py
+1
-1
getTop100Answer.py
eda/recommended_indexs/code/getTop100Answer.py
+1
-1
getTop100Diary.py
eda/recommended_indexs/code/getTop100Diary.py
+1
-1
getTop100Question.py
eda/recommended_indexs/code/getTop100Question.py
+1
-1
No files found.
.idea/vcs.xml
0 → 100644
View file @
4adad597
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
eda/recommended_indexs/code/getClickTimes2CountUid.py
View file @
4adad597
...
...
@@ -34,7 +34,7 @@ def df2file(df,fpath):
tplt
=
"{0:^10}
\t
{1:^10}
\n
"
f
.
write
(
"#2. Top特征
\n
"
)
f
.
write
(
"=================================================================
\n
"
)
f
.
write
(
"2.1用户点击次数分布(第一列:用户点击次数;第二列:独立用户数量)
\n
"
)
f
.
write
(
"2.1
用户点击次数分布(第一列:用户点击次数;第二列:独立用户数量)
\n
"
)
f
.
write
(
tplt
.
format
(
"click_times"
,
"count_uid"
))
for
row
in
df
.
iterrows
():
line
=
tplt
.
format
(
row
[
1
][
0
],
row
[
1
][
1
])
...
...
eda/recommended_indexs/code/getTop100Answer.py
View file @
4adad597
...
...
@@ -21,7 +21,7 @@ def tuple2dict(tuple_result):
def
result2file
(
result_lst
,
fpath
):
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
"
f
.
write
(
"Top 100 Answer
\n
"
)
f
.
write
(
"
2.3
Top 100 Answer
\n
"
)
f
.
write
(
"=================================================================
\n
"
)
f
.
write
(
tplt
.
format
(
"平台"
,
"answer_id"
,
"点击数"
,
"曝光数"
,
"点击率"
,
"answer链接"
))
for
i
in
result_lst
:
...
...
eda/recommended_indexs/code/getTop100Diary.py
View file @
4adad597
...
...
@@ -21,7 +21,7 @@ def tuple2dict(tuple_result):
def
result2file
(
result_lst
,
fpath
):
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
"
f
.
write
(
"Top 100 diary
\n
"
)
f
.
write
(
"
2.2
Top 100 diary
\n
"
)
f
.
write
(
"=================================================================
\n
"
)
f
.
write
(
tplt
.
format
(
"平台"
,
"diary_id"
,
"点击数"
,
"曝光数"
,
"点击率"
,
"diary链接"
))
for
i
in
result_lst
:
...
...
eda/recommended_indexs/code/getTop100Question.py
View file @
4adad597
...
...
@@ -21,7 +21,7 @@ def tuple2dict(tuple_result):
def
result2file
(
result_lst
,
fpath
):
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
"
f
.
write
(
"Top 100 Question(曝光表里cid类型没有question,因此下面的曝光数和点击率都为0)
\n
"
)
f
.
write
(
"
2.4
Top 100 Question(曝光表里cid类型没有question,因此下面的曝光数和点击率都为0)
\n
"
)
f
.
write
(
"=================================================================
\n
"
)
f
.
write
(
tplt
.
format
(
"平台"
,
"question_id"
,
"点击数"
,
"曝光数"
,
"点击率"
,
"question链接"
))
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