machine learning methods for longitudinal data