Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
alpha-mind
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dr.李
alpha-mind
Commits
383a93c5
Commit
383a93c5
authored
Feb 10, 2018
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
when short of data
parent
7c52dee8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
data_preparing.py
alphamind/model/data_preparing.py
+3
-3
No files found.
alphamind/model/data_preparing.py
View file @
383a93c5
...
...
@@ -292,10 +292,10 @@ def fetch_train_phase(engine,
if
dates
[
-
1
]
==
dt
.
datetime
.
strptime
(
ref_date
,
'
%
Y-
%
m-
%
d'
):
end
=
dates
[
-
2
]
start
=
dates
[
-
batch
-
1
]
start
=
dates
[
-
batch
-
1
]
if
batch
<=
len
(
dates
)
-
1
else
dates
[
0
]
else
:
end
=
dates
[
-
1
]
start
=
dates
[
-
batch
]
start
=
dates
[
-
batch
]
if
batch
<=
len
(
dates
)
else
dates
[
0
]
index
=
(
date_label
>=
start
)
&
(
date_label
<=
end
)
this_raw_x
=
x_values
[
index
]
...
...
@@ -370,7 +370,7 @@ def fetch_predict_phase(engine,
if
dates
[
-
1
]
==
dt
.
datetime
.
strptime
(
ref_date
,
'
%
Y-
%
m-
%
d'
):
end
=
dates
[
-
1
]
start
=
dates
[
-
batch
]
start
=
dates
[
-
batch
]
if
batch
<=
len
(
dates
)
else
dates
[
0
]
left_index
=
bisect
.
bisect_left
(
date_label
,
start
)
right_index
=
bisect
.
bisect_right
(
date_label
,
end
)
...
...
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