Skip to content

Commit

Permalink
Merge pull request #22 from zhkai/patch-7
Browse files Browse the repository at this point in the history
Update data_handler.py
  • Loading branch information
KasperSkytte authored Sep 24, 2024
2 parents 64907c8 + b7cac5e commit fe9d5cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ def train_batched(self):
@property
def val_batched(self):
"""Batches of validation data."""
return self._make_batched_dataset(self._all.iloc[self._train_val_index-self.predict_timestamp:self._val_test_index+self.predict_timestamp,
return self._make_batched_dataset(self._all.iloc[self._train_val_index-self.window_width:self._val_test_index+self.predict_timestamp,
self.clusters], endindex=True)

@property
def test_batched(self):
"""Batches of test data."""
return self._make_batched_dataset(self._all.iloc[self._val_test_index-self.predict_timestamp:, self.clusters], endindex=True)
return self._make_batched_dataset(self._all.iloc[self._val_test_index-self.window_width:, self.clusters], endindex=True)

@property
def all_batched(self):
Expand Down Expand Up @@ -122,7 +122,7 @@ def _make_batched_dataset(self, dataset, endindex):
targets=target,
length=self.window_width,
stride=1,
shuffle=True,
shuffle=False,
end_index=T_ - self.predict_timestamp,
batch_size=self.window_batch_size # can find the best from 8 10 16
)
Expand Down

0 comments on commit fe9d5cd

Please sign in to comment.