Machine Learning Algorithms for Longitudinal Clustering