I'm studying how to detect anomalies in the time series using an Autoeconder. In particular, I'm following the guide posted in the Keras website, but I don't understand why they are creating and how can I adapt it to my dataset. In their guide they load the dataset and create a sequence:
TIME_STEPS = 288
# Generated training sequences for use in the model.
def create_sequences(values, time_steps=TIME_STEPS):
output = []
for i in range(len(values) - time_steps):
output.append(values[i : (i + time_steps)])
return np.stack(output)
x_train = create_sequences(df_training_value.values)
print("Training input shape: ", x_train.shape)
The reason why they are using 288 as TIME_STEPS is because they have a value for every 5 mins for 14 days. My questions are:
Does this method split the data or is he just creating a 3D variable in the correct format for the Convolutional Autoencoder?
I have a dataset where there are stored the measurements of 30 devices. Each device has about 4000 values and it is structured as well:
device01 0.02;0.13;1.15;0.10;8.30;........;4.20 device02 0.06;0.13;1.40;0.03;7.40;........;6.30 ........ device30 0.03;0.24;1.10;0.43;4.40;........;2.30
Since I do not have a timestamp reference in my dataset, how can I define the TIME_STEPS variable?