Unsupervised analysis of behaviour dynamics