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
154779c6
Commit
154779c6
authored
Aug 15, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add print for test
parent
b38b8e05
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
processData.py
processData.py
+6
-6
utils.py
utils.py
+1
-1
No files found.
processData.py
View file @
154779c6
...
@@ -53,12 +53,12 @@ def feature_en(data_start_date, data_end_date, validation_date, test_date):
...
@@ -53,12 +53,12 @@ def feature_en(data_start_date, data_end_date, validation_date, test_date):
print
(
data
.
head
(
2
))
print
(
data
.
head
(
2
))
# 持久化候选cid
# 持久化候选cid
#
data_set_cid = data["cid"].unique()
data_set_cid
=
data
[
"cid"
]
.
unique
()
#
cid_df = pd.DataFrame()
cid_df
=
pd
.
DataFrame
()
#
cid_df['cid'] = data_set_cid
cid_df
[
'cid'
]
=
data_set_cid
#
print("data_set_cid :")
print
(
"data_set_cid :"
)
#
print(cid_df.head(2))
print
(
cid_df
.
head
(
2
))
#
cid_df.to_csv(DIRECTORY_PATH + "data_set_cid.csv", index=False)
cid_df
.
to_csv
(
DIRECTORY_PATH
+
"data_set_cid.csv"
,
index
=
False
)
# 将device_id 保存,目的是为了判断预测的device_id是否在这个集合里,如果不在,不需要预测
# 将device_id 保存,目的是为了判断预测的device_id是否在这个集合里,如果不在,不需要预测
data_set_device_id
=
data
[
"device_id"
]
.
unique
()
data_set_device_id
=
data
[
"device_id"
]
.
unique
()
...
...
utils.py
View file @
154779c6
...
@@ -16,7 +16,7 @@ def get_date():
...
@@ -16,7 +16,7 @@ def get_date():
month
=
now
.
month
month
=
now
.
month
day
=
now
.
day
day
=
now
.
day
date
=
datetime
(
year
,
month
,
day
)
date
=
datetime
(
year
,
month
,
day
)
data_start_date
=
(
date
-
timedelta
(
days
=
6
))
.
strftime
(
"
%
Y-
%
m-
%
d"
)
data_start_date
=
(
date
-
timedelta
(
days
=
5
))
.
strftime
(
"
%
Y-
%
m-
%
d"
)
data_end_date
=
(
date
-
timedelta
(
days
=
2
))
.
strftime
(
"
%
Y-
%
m-
%
d"
)
data_end_date
=
(
date
-
timedelta
(
days
=
2
))
.
strftime
(
"
%
Y-
%
m-
%
d"
)
validation_date
=
(
date
-
timedelta
(
days
=
3
))
.
strftime
(
"
%
Y-
%
m-
%
d"
)
validation_date
=
(
date
-
timedelta
(
days
=
3
))
.
strftime
(
"
%
Y-
%
m-
%
d"
)
test_date
=
data_end_date
test_date
=
data_end_date
...
...
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