Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] extend SSTBAN input/output dim from 1 to data dim #401

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libcity/data/dataset/dataset_subclass/sstban_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def seq2instance_plus(data, num_his, num_pred):
y = []
for i in range(num_sample):
x.append(data[i: i + num_his])
y.append(data[i + num_his: i + num_his + num_pred, :, :1])
y.append(data[i + num_his: i + num_his + num_pred])
x = np.array(x)
y = np.array(y)
return x, y
Expand Down Expand Up @@ -73,7 +73,7 @@ def _split_x_y_te(self, data_sets, te_sets):
te = {}
for set_name in data_sets.keys():
data_set = data_sets[set_name]
x, y = seq2instance_plus(data_set[..., :1].astype("float64"), self.input_window, self.output_window)
x, y = seq2instance_plus(data_set[..., :self.output_dim].astype("float64"), self.input_window, self.output_window)
xy[set_name] = [x, y]
# handle te
te_set = te_sets[set_name]
Expand Down