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
a2224a62
Commit
a2224a62
authored
6 years ago
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add pridict param
parent
bb15647c
master
gyz
mr/beta/bug22
offic
rtt
test
updatedb
wzw
zhao
zhao22
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
diaryTraining.py
diaryTraining.py
+2
-1
utils.py
utils.py
+3
-2
No files found.
diaryTraining.py
View file @
a2224a62
...
...
@@ -15,6 +15,7 @@ def train():
print
(
"predicting"
)
ffm_model
.
setTest
(
DIRECTORY_PATH
+
"test_ffm_data.csv"
)
ffm_model
.
setSigmoid
()
ffm_model
.
predict
(
DIRECTORY_PATH
+
"model.out"
,
DIRECTORY_PATH
+
"test_set_predict_output.txt"
)
param_predict
=
{
"log"
:
"/data2/models/result"
}
ffm_model
.
predict
(
param_predict
,
DIRECTORY_PATH
+
"model.out"
,
DIRECTORY_PATH
+
"test_set_predict_output.txt"
)
This diff is collapsed.
Click to expand it.
utils.py
View file @
a2224a62
...
...
@@ -17,8 +17,9 @@ def get_date():
day
=
now
.
day
date
=
datetime
(
year
,
month
,
day
)
data_start_date
=
(
date
-
timedelta
(
days
=
5
))
.
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"
)
data_end_date
=
(
date
-
timedelta
(
days
=
1
))
.
strftime
(
"
%
Y-
%
m-
%
d"
)
validation_date
=
(
date
-
timedelta
(
days
=
2
))
.
strftime
(
"
%
Y-
%
m-
%
d"
)
# 验证集和测试集的日期必须相差一天,否则切割数据集时会报错
test_date
=
data_end_date
print
(
"data_start_date,data_end_date,validation_date,test_date:"
)
print
(
data_start_date
,
data_end_date
,
validation_date
,
test_date
)
...
...
This diff is collapsed.
Click to expand it.
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