Pattern recognition techniques for time series