I have time series dataset and I want to break it into segments, in order to run autoencoder on individual segments. After some research, PAA does what I need: it breaks the dataset into segments (windows) of equal sizes. However, it seems that number of segments is found via trial-and-error. Is there any approach that can automate the choice of those segments? Something similar to the elbow curve for k-means.