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
22d0ce14
Commit
22d0ce14
authored
Apr 29, 2019
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
把最近一天的数据集放进训练集
parent
759b7930
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
multi.py
tensnsorflow/multi.py
+9
-6
No files found.
tensnsorflow/multi.py
View file @
22d0ce14
...
@@ -141,10 +141,13 @@ def get_predict(date,value_map,app_list_map,level2_map,level3_map):
...
@@ -141,10 +141,13 @@ def get_predict(date,value_map,app_list_map,level2_map,level3_map):
"recover_time"
,
"top"
)
\
"recover_time"
,
"top"
)
\
.
rdd
.
map
(
lambda
x
:
(
app_list_func
(
x
[
0
],
app_list_map
),
app_list_func
(
x
[
1
],
level2_map
),
.
rdd
.
map
(
lambda
x
:
(
app_list_func
(
x
[
0
],
app_list_map
),
app_list_func
(
x
[
1
],
level2_map
),
app_list_func
(
x
[
2
],
level3_map
),
x
[
3
],
x
[
4
],
x
[
5
],
x
[
6
],
x
[
7
],
x
[
8
],
app_list_func
(
x
[
2
],
level3_map
),
x
[
3
],
x
[
4
],
x
[
5
],
x
[
6
],
x
[
7
],
x
[
8
],
value_map
[
x
[
3
]],
value_map
[
x
[
9
]],
value_map
.
get
(
x
[
3
],
300000
),
value_map
.
get
(
x
[
9
],
299999
),
value_map
[
x
[
10
]],
value_map
[
x
[
11
]],
value_map
[
x
[
12
]],
value_map
[
x
[
13
]],
value_map
.
get
(
x
[
10
],
299998
),
value_map
.
get
(
x
[
11
],
299997
),
value_map
[
x
[
14
]],
value_map
[
x
[
15
]],
value_map
[
x
[
16
]],
value_map
[
x
[
17
]],
value_map
.
get
(
x
[
12
],
299996
),
value_map
.
get
(
x
[
13
],
299995
),
value_map
[
x
[
18
]],
value_map
[
x
[
19
]],
value_map
[
x
[
20
]],
value_map
.
get
(
x
[
21
],
30000
),
value_map
.
get
(
x
[
14
],
299994
),
value_map
.
get
(
x
[
15
],
299993
),
value_map
.
get
(
x
[
16
],
299992
),
value_map
.
get
(
x
[
17
],
299991
),
value_map
.
get
(
x
[
18
],
299990
),
value_map
.
get
(
x
[
19
],
299989
),
value_map
.
get
(
x
[
20
],
299988
),
value_map
.
get
(
x
[
21
],
299987
),
value_map
[
date
]))
value_map
[
date
]))
rdd
.
persist
()
rdd
.
persist
()
...
@@ -173,9 +176,9 @@ def get_predict(date,value_map,app_list_map,level2_map,level3_map):
...
@@ -173,9 +176,9 @@ def get_predict(date,value_map,app_list_map,level2_map,level3_map):
.
map
(
lambda
x
:
(
x
[
0
],
x
[
1
],
x
[
2
],
x
[
9
],
x
[
10
],
x
[
11
],
x
[
12
],
x
[
13
],
x
[
14
],
x
[
15
],
.
map
(
lambda
x
:
(
x
[
0
],
x
[
1
],
x
[
2
],
x
[
9
],
x
[
10
],
x
[
11
],
x
[
12
],
x
[
13
],
x
[
14
],
x
[
15
],
x
[
16
,
x
[
17
],
x
[
18
],
x
[
19
],
x
[
20
],
x
[
21
],
x
[
22
],
x
[
23
]])))
\
x
[
16
,
x
[
17
],
x
[
18
],
x
[
19
],
x
[
20
],
x
[
21
],
x
[
22
],
x
[
23
]])))
\
.
toDF
(
"app_list"
,
"level2_ids"
,
"level3_ids"
,
"ucity_id"
,
.
toDF
(
"app_list"
,
"level2_ids"
,
"level3_ids"
,
"ucity_id"
,
"ccity_name"
,
"device_type"
,
"manufacturer"
,
"channel"
,
"t
op"
,
"t
ime"
,
"hospital_id"
,
"ccity_name"
,
"device_type"
,
"manufacturer"
,
"channel"
,
"time"
,
"hospital_id"
,
"treatment_method"
,
"price_min"
,
"price_max"
,
"treatment_time"
,
"maintain_time"
,
"treatment_method"
,
"price_min"
,
"price_max"
,
"treatment_time"
,
"maintain_time"
,
"recover_time"
,
"stat_date"
)
.
write
.
csv
(
'/recommend/nearby'
,
mode
=
'overwrite'
,
header
=
True
)
"recover_time"
,
"
top"
,
"
stat_date"
)
.
write
.
csv
(
'/recommend/nearby'
,
mode
=
'overwrite'
,
header
=
True
)
rdd
.
unpersist
()
rdd
.
unpersist
()
...
...
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