Research Article
A Method for Driving Route Predictions Based on Hidden Markov Model
Algorithm 3
Possible_Routes (an observation sequence
).
Input: An observation sequence . | Output: A set of upcoming vehicle routes’ symbols. | (1) Ordered Observation Set , ; | (2) Possible Route Set ; | (3) Foreach (Observation in ) | (4) if | (5) /∗ is a set of all of observations in the training set. ∗/ | (6) Insert into ; | (7) else | (8) Insert into ; | (9) int = length of ; | (10) int = length of ; | (11) if () | (12) ; | (13) else if () | (14) = Viterbi_Route (); | (15) else if ( and ) | (16) /∗ represents the first element in the set . ∗/ | (17) = Viterbi_Route (); | (18) else if () | (19) Possible_Routes (); | (20) else if () | (21) Possible_Routes (); | (22) else | (23) Possible_Routes (); |
|