Group Based Trajectory Machine Learning