Predicting driving direction with weighted Markov model