thuml/Time-Series-Library

Use my own dataset from multi-variate regression task

IKetchup opened this issue · 2 comments

Hello, thank you for your amazing work.

I woud like to train TimesNet to predict 3D timeseries from other differents 3D timeseries. My goal is to use timeseries of shape (batch_size, len_size, input_features) to predict differents timeseries of shape (batch_size, len_size, output_features) with input_features different from output_features (no commun features). Is it possible to do so as this type of problem is not exaclty seen as forcasting and if possible how should I start ?
Thnaks in advance

Hi, I think this task is quite difficult since the predicted target is different from the input.
You can try the models in TSLib and I think they are applicable. As for better performance, you may find this paper helpful: https://arxiv.org/abs/2402.19072

Thank you for your quick anwser. The paper is in fact really interresting. I am currently rewriting the class TensorDataset to load my own dataset in the format accepted by TimesNet in the forward function.

My data are sampled at 50Hz and as time feature I simply have a column "time" in seconds corresponding to a relative time of recording. Could I use this feature to generate my data_stam by slicing in the same way as my window slicer for x and y:

def __read_data__(self):


data = pd.read_csv("my_data.csv")

#process my data

#split my data using a sliding window (not the proper code)
for i in range of (num_windows)
x[i,:,:] = data.iloc[start:end,:]
y[i,:,:] = data.iloc[start + seq_len:end + seq_len,:]

x_data_stamp[i,:,:] = data["time"].iloc[start:end,:]
y_data_stamp[i,:,:] = data["time"].iloc[start + seq_len:end + seq_len,:]
....


def __get_item__(self, index):

return x[index], y[index], x_data_stamp[index], y_data_stamp[index]

And then is there an option in the Embed functions to adapt to my new "data_stamp" ?

I suppose the he data shape is (seq_len, batch_size, features). Is that right ?

Last question, should I normalize my time feature like the rest of the other variables or leave it unmodified ?