Home/Soccer Analytics/Dynamic Time Warping for Ball Trajectory Similarity

Dynamic Time Warping for Ball Trajectory Similarity

Data InfrastructureLevel 3 — Advanced

What It Is

Applying Dynamic Time Warping (DTW) rather than Euclidean distance to compare ball trajectories (sequences of passes and carries), handling variable-length sequences and temporal shifts. Structurally similar play patterns are matched regardless of pace differences — a quick counter and a slower buildup that follow the same spatial path are recognized as similar.

Correct Execution

For each possession, extract the ball trajectory as a sequence of (x,y) coordinates. Compare using DTW (which aligns sequences optimally rather than point-by-point). DTW distance = dissimilarity. Cluster by DTW distance to find recurring patterns across matches, teams, and competitions.

Sources

  • Ahmed El-Roby, StatsBomb Conference 2023, YouTube, 2023-11-02