Wavelet clustering in time series analysis