Similarity between time-dependent paths Let us have a board, and a set of trajectories on that board. Those trajectories are represented as time-dependent curves, $\gamma_i:[0,T_i] \longrightarrow\mathbb{R}^2$, where the $T_i>0$ are non necessarily equal for the different $i$'s (actually, most of the times they will be different). I've read about some ways of comparing geometrical paths, but they only measure the similarity between their graphs, not taking into account the time. Also, we are not interested only about the final graph, but also about how that path has been walked (for instance, maybe the "walker" has gone back and forth several times over the same segment, which would make it a different path that if the walker had not gone through the same path twice).
I would like to be able to measure the similarity in both space and time. That is, $\gamma_i = \gamma_j$ if and only if $T_i=T_j$ and $\gamma_i(t)=\gamma_j(t)$ $\forall t \in [0,T_i]$, so I can use to find clusters among the set of trajectories. Is there any similarity measure like that?
If it helps, most of our paths are a continuous sequence of line segments.
 A: It seems like a good starting point could be the RMS distance between the paths over time:
$$
\left\|\gamma_i - \gamma_j \right\|^2 = \int \left| \gamma_i(t) - \gamma_j(t) \right|^2 \, dt
$$
One tricky point would be that the paths end at different times $T_i$, but there are some possible ways around that. For example, just let $T = \max_i T_i$ and let $\gamma_i(t) = \gamma_i(T_i)$ for $t > T_i$.
A: A first approach could be to discretize the time and space variables and produce (sparse) boolean features : "Between time $[t_i,t_i+\delta]$, was the position in the square $[x_j,x_j+\epsilon],[y_k,y_k+\epsilon]$" ?
For small enough $\delta,\epsilon$, the property "$\gamma_i = \gamma_j$ if and only if $T_i=T_j$ and $\gamma_i(t)=\gamma_j(t)$ $\forall t \in [0,T_i]$" will coincide will all the boolean values being equal.
But there must be much more valuable information in some data science competitions related to your problem :


*

*axa-driver-telematics-analysis

*predict-taxi-service-trajectory-i
