Research Article

Joint Modeling of User Behaviors Based on Variable-Order Additive Markov Chain for POI Recommendation

Algorithm 1

Serialization algorithm.
Input: Training trajectories of user u: ,,
Output: Dense trajectories set of user u:
1: for (; ; ) do
2:  Get the trajectories count of u: ;
3:  Set trajectory index: p =0;
4:  whiledo
5:   Get the length of trajectory ;
6:   ifthen
7:    
8:   else if and then
9:    Adds the current trajectory to the next one
10:   else if and then
11:    Get the time interval of and .
12:    if then
13:     Insert to ,
14:    else
15:     Insert to ,
16:    end if
17:   else
18:   Insert into ,
19:   end if
20:  end while
21: end for
22: Return .