Online Learning Algorithms for Mining Trajectory data and their Applications