Time series clustering and classification by the autoregressive metric