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
06fe12d1
Commit
06fe12d1
authored
Apr 29, 2019
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
把最近一天的数据集放进训练集
parent
82076f91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
multi.py
tensnsorflow/multi.py
+1
-2
No files found.
tensnsorflow/multi.py
View file @
06fe12d1
...
@@ -4,7 +4,6 @@ from pyspark.conf import SparkConf
...
@@ -4,7 +4,6 @@ from pyspark.conf import SparkConf
import
pytispark.pytispark
as
pti
import
pytispark.pytispark
as
pti
# from pyspark.sql import SQLContext
# from pyspark.sql import SQLContext
from
pyspark.sql
import
SparkSession
from
pyspark.sql
import
SparkSession
from
pyspark.sql.functions
import
_lit_doc
import
datetime
import
datetime
import
pandas
as
pd
import
pandas
as
pd
...
@@ -133,7 +132,7 @@ def get_predict(date,value_map,app_list_map,level2_map,level3_map):
...
@@ -133,7 +132,7 @@ def get_predict(date,value_map,app_list_map,level2_map,level3_map):
df
=
df
.
na
.
fill
(
dict
(
zip
(
features
,
features
)))
df
=
df
.
na
.
fill
(
dict
(
zip
(
features
,
features
)))
df
=
df
.
drop_duplicates
([
"ucity_id"
,
"level2_ids"
,
"ccity_name"
,
"device_type"
,
"manufacturer"
,
df
=
df
.
drop_duplicates
([
"ucity_id"
,
"level2_ids"
,
"ccity_name"
,
"device_type"
,
"manufacturer"
,
"device_id"
,
"cid
,
id"
,
"label"
,
"device_id"
,
"cid
_
id"
,
"label"
,
"channel"
,
"top"
,
"time"
,
"app_list"
,
"hospital_id"
,
"level3_ids"
])
"channel"
,
"top"
,
"time"
,
"app_list"
,
"hospital_id"
,
"level3_ids"
])
rdd
=
df
.
select
(
"app_list"
,
"level2_ids"
,
"level3_ids"
,
"ucity_id"
,
"device_id"
,
"cid_id"
,
"label"
,
"y"
,
"z"
,
rdd
=
df
.
select
(
"app_list"
,
"level2_ids"
,
"level3_ids"
,
"ucity_id"
,
"device_id"
,
"cid_id"
,
"label"
,
"y"
,
"z"
,
...
...
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