mirror of
https://github.com/wassname/rl-portfolio-management.git
synced 2026-06-27 17:02:01 +08:00
misc bugfixes
This commit is contained in:
+7527
-546
File diff suppressed because one or more lines are too long
@@ -107,10 +107,10 @@ class DataSrc(object):
|
|||||||
# get data for this episode
|
# get data for this episode
|
||||||
if self.random_reset:
|
if self.random_reset:
|
||||||
self.idx = np.random.randint(
|
self.idx = np.random.randint(
|
||||||
low=self.window_length + 1, high=self._data.shape[1] - self.steps - 1)
|
low=self.window_length + 1, high=self._data.shape[1] - self.steps - 2)
|
||||||
else:
|
else:
|
||||||
# continue sequentially, before reseting to start
|
# continue sequentially, before reseting to start
|
||||||
if self.idx>(self._data.shape[1] - self.steps - 1):
|
if self.idx>(self._data.shape[1] - self.steps - self.window_length - 1):
|
||||||
self.idx=self.window_length + 1
|
self.idx=self.window_length + 1
|
||||||
else:
|
else:
|
||||||
self.idx += self.steps
|
self.idx += self.steps
|
||||||
|
|||||||
+1797
-361
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user