Skip to main content
. 2022 Dec 23;23(1):130. doi: 10.3390/s23010130
Algorithm 1 Trajectory Shapley
Input:
  Randomly selected background sample S={G1,,G|V|},
  Explain region coordinate (x, y) in terms of grid,
  Set trajectories P={T1,,T|N|} in t time slot,
  Flow tensor Gt, pretrain model f.
Output:
  •    1:

    Trajectory Shapley set M

  •    2:

    Initialize ϕ(Gt)=0, M=

  •    3:

    Generate output Yt+1=f(Gt)

  •    4:

    Obtain EYt+1=1|V|GiSGi

  •    5:

    Calculate ϕ(Gt) using Equation (3)

  •    6:

    for all trajectories Ti in P do

  •    7:

     Calculate ϕ(Ti) using Equation (4)

  •    8:

     Add ϕ(Ti) to M

  •    9:

    end for

  •  10:

    return M