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
a83f46f0
Commit
a83f46f0
authored
Aug 07, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix sql bug
parent
e460c3c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
diaryCandidateSet.py
diaryCandidateSet.py
+1
-1
userDiaryPredict.py
userDiaryPredict.py
+11
-0
No files found.
diaryCandidateSet.py
View file @
a83f46f0
...
@@ -5,7 +5,7 @@ from config import *
...
@@ -5,7 +5,7 @@ from config import *
def
get_allCitiesDiaryTop2000
():
def
get_allCitiesDiaryTop2000
():
# 获取全国点击量TOP2000日记
# 获取全国点击量TOP2000日记
sql
=
"select city_id,cid where cid_type = 'diary' order by click_count_choice desc limit 2000"
sql
=
"select city_id,cid
from data_feed_click
where cid_type = 'diary' order by click_count_choice desc limit 2000"
allCitiesTop2000
=
con_sql
(
sql
)
allCitiesTop2000
=
con_sql
(
sql
)
allCitiesTop2000
=
allCitiesTop2000
.
rename
(
columns
=
{
0
:
"city_id"
,
1
:
"cid"
})
allCitiesTop2000
=
allCitiesTop2000
.
rename
(
columns
=
{
0
:
"city_id"
,
1
:
"cid"
})
allCitiesTop2000
.
to_csv
(
DIRECTORY_PATH
+
"diaryTestSet/allCitiesDiaryTop2000.csv"
)
allCitiesTop2000
.
to_csv
(
DIRECTORY_PATH
+
"diaryTestSet/allCitiesDiaryTop2000.csv"
)
...
...
userDiaryPredict.py
0 → 100644
View file @
a83f46f0
# 接收device_id、city_id
# 将device_id、city_id拼接到对应的城市热门日记表
# 把ffm.pkl load进来,将上面的表转化为ffm格式
# 将模型加载,预测,把预测日记的概率值按照降序排序,存到一个表里
# 预测一些真实的device_id
\ No newline at end of file
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