Accurate classification of time series based on a new robust similarity measure