I have independent multiple time series datasets with same features. They are drilling proccesses in bone. Each dataset is a measurement. Is there a way to store all the datasets into a Matrix or tensor and train the model with all the datasets at once ?
I looked at the internet and did not find anything that is describing my problem.
I found this solution ? is this correct ?
import numpy as np
stacked_data = np.stack((dataset1, dataset2, ..., datasetn), axis=1)
stacked_labels = np.concatenate((labels1, labels2, ..., labelsn), axis=0)
Here, np.stack stacks the datasets along a new axis (i.e., axis 1), resulting in a tensor with shape (total_number_of_time_steps, n, number_of_features). The first axis corresponds to the time dimension across all datasets, the second axis corresponds to the dataset dimension, and the third axis corresponds to the feature dimension.
At the end i would call
model.fit(stacked_data, stacked_labels, epochs=10, batch_size=32)
is this method a legit way ?