Autoencoder with variable length data input

Hi all,
I’m trying to create a model for anomaly detection like those described in the link below:

which makes use of ECG5000 dataset.

In the above-mentioned example, they make use of a dense layer autoencoder; they train the model with only normal ECG curves; each ECG curvers are made of 140 samples.
In my case, the dataset is made of a time series in which each curve has a different number of samples (they could be 140, 145, 160, 130 and so on).

In your opinion, what could be the best approach to face this problem?
As a possible solution, I thought of padding each curve at the maximum length, but the problem is that I don’t know in advance what could be the maximum duration.

thank for your suggestion,
regards

Hi @savino_giusto,

You can try in the reverse scenario. Fix a minimum length, for example 140 and if its less than that do padding else prune the extra length and then try to train the model.

Thanks.

Thanks for your reply. I’ll try your suggest. Padding and prouning should be a good advice.

1 Like