Inferring the transportation mode from sparse GPS data