Clustering time series data by analysing graphical models of connectivity and the application to diagnosis of brain disorders