Closed xyjigsaw closed 3 years ago
I don't understand what you mean.
Sorry to bother you, the variable day_slot is not used here.
def data_transform(data, n_his, n_pred, day_slot, device):
# produce data slices for x_data and y_data
n_vertex = data.shape[1]
len_record = len(data)
num = len_record - n_his - n_pred
x = np.zeros([num, 1, n_his, n_vertex])
y = np.zeros([num, n_vertex])
for i in range(num):
head = i
tail = i + n_his
x[i, :, :, :] = data[head: tail].reshape(1, n_his, n_vertex)
y[i] = data[tail + n_pred - 1]
return torch.Tensor(x).to(device), torch.Tensor(y).to(device)
But I've found it doesn't matter.
It seems that the variable day_slot is not used. How to implement the process mentioned in the paper?