A comparative study of different methods of predicting time series