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
8f18a377
Commit
8f18a377
authored
Dec 12, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change transform
parent
6bfa857c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
ffm.py
tensnsorflow/ffm.py
+10
-1
No files found.
tensnsorflow/ffm.py
View file @
8f18a377
...
@@ -68,7 +68,7 @@ def get_data():
...
@@ -68,7 +68,7 @@ def get_data():
def
transform
(
df
,
validate_date
):
def
transform
(
df
,
validate_date
):
model
=
multiFFMFormatPandas
()
model
=
multiFFMFormatPandas
()
for
i
in
range
(
100000
,
200000
,
10000
)
:
for
i
in
[
200000
,
160000
,
130000
]
:
a
=
time
.
time
()
a
=
time
.
time
()
temp
=
model
.
fit_transform
(
df
,
y
=
"y"
,
n
=
i
,
processes
=
18
)
temp
=
model
.
fit_transform
(
df
,
y
=
"y"
,
n
=
i
,
processes
=
18
)
b
=
time
.
time
()
b
=
time
.
time
()
...
@@ -122,6 +122,15 @@ def get_statistics():
...
@@ -122,6 +122,15 @@ def get_statistics():
df
=
df
.
drop
(
"total"
,
axis
=
1
)
df
=
df
.
drop
(
"total"
,
axis
=
1
)
return
df
return
df
def
get_predict_set
():
db
=
pymysql
.
connect
(
host
=
'10.66.157.22'
,
port
=
4000
,
user
=
'root'
,
passwd
=
'3SYz54LS9#^9sBvC'
,
db
=
'jerry_test'
)
sql
=
"select device_id,y,z,stat_date,ucity_id,cid_id,clevel1_id,ccity_name from esmm_pre_data where label = 0"
native_pre
=
con_sql
(
db
,
sql
)
native_pre
=
native_pre
.
rename
(
columns
=
{
0
:
"device_id"
,
1
:
"y"
,
2
:
"z"
,
3
:
"stat_date"
,
4
:
"ucity_id"
,
5
:
"cid_id"
,
6
:
"clevel1_id"
,
7
:
"ccity_name"
})
print
(
"native_pre ok"
)
class
multiFFMFormatPandas
:
class
multiFFMFormatPandas
:
def
__init__
(
self
):
def
__init__
(
self
):
...
...
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