This small project have two purposes:
To achieve the first objective, I analysed the tracking data of a football match and computed approximate entropy (ApEn) values for each player. I then used these values as a collective performance indicator that quantifies the pitch positioning predictability of each player.
To achieve the second objective, I compared the obtained ApEn values of players in the first half of matches to those in the second half to investigate the potential effects of external factors on player’s positioning.
Approximate entropy (ApEn) is a technique used to quantify the amount of predictability in a time-series data without any prior knowledge on the data-generating distribution. A low value of ApEn indicates the time-series is predictable, a high value indicates otherwise. Previous studies have applied ApEn to the tracking data from a football match to quantify movement patterns of players in terms of pitch positioning predictability. Examples of such studies are following:
Sampaio & Maçãs (2011) investigated the effect of small-sided games on player’s tactical understanding. The ApEn was applied to the distance between team’s centroid and each player over the match. Lower ApEn in the post test indicated player’s expertise in football increased due to the training sessions.
Memmert et al. (2017) applied ApEn to the distance between each player and position-specific centroids in a game between Bayern Munich and Barcelona. The part of result showed Bayern Munich central midfielder was highly predictable in his positioning relative to his positional centroid, indicating his pivotal role between players.
This project followed the approach of Memmert et al. (2017), which are following:
To clarify the approach of Memmert et al. (2017), two centroids are visualised below.

Positional centroids (right) are calculated by averaging locations of players who belong to the same position (e.g. defenders). One can also calculate another metric, team centroid (left) which is the average location of all players on the pitch. While both metrics offer valuable insights, positional centroids are generally considered more effective in capturing players’ movement patterns (Memmert et al., 2017).
After calculating the positional centroids, we can determine the distance between each player and their corresponding centroid. This process yields a vector containing distance values for each player. By inputting this vector into a function that calculates ApEn, we obtain a scalar value representing the predictability of a player’s positioning relative to their centroid.
Data for this project is tracking data from a football match, stored in two excel files (1st & 2nd half). Each file contains the following features:
Pandas read_excel method was used to read the excel files into a pandas DataFrame prior to data processing.
Although the data is in a clean tabular format, some preprocessing steps were necessary before conducting the further analysis. The following are some of the crucial steps taken:
idx_to_drop = df[df['PlayerID'].isin(['VitesseO19101', 'PSVO17179'])].index
df.drop(idx_to_drop, inplace=True)
Since the data is recorded in milliseconds, preceding and next rows should contain similar coordinate values. Hence forward filling was used.
df[['X','Y']] = df[['X','Y']].fillna(method= 'ffill')
We first create a new DataFrame df_centroids by getting the average X and Y coordinates of players based on their position and team for each timestamp
df_centroids = df.groupby(['Timestamp', 'Position', 'Team'], as_index=False).agg({'X': np.mean, 'Y': np.mean})
df_centroids.rename(columns = {'X':'Centroid_X', 'Y':'Centroid_Y'}, inplace = True)
We can now merge two DataFrames again.
df_merged = df.merge(df_centroids, how='inner', on = ['Timestamp', 'Position', 'Team'])
This is the final step of processing, we calculate the euclidean distance between each player and their position centroid for each timestamp with np.linalg.norm.
df_merged['Distance_to_Centroid'] = np.linalg.norm(
df_merged.loc[:, ['X', 'Y']].values - df_merged.loc[:, ['Centroid_X', 'Centroid_Y']],
axis=1)
| PlayerID | Position | Predictability 1st | Predictability 2nd |
|---|---|---|---|
| PSVO19223 | ST | Medium | Low |
| VitesseO19104 | ST | Low | Low |
| VitesseO19119 | LWG | High | High |
| PSVjong2 | LWG | High | High |
| VitesseO19123 | RWG | High | High |
| PSVO19215 | RWG | Medium | Medium |
| PSVO19177 | CAM | Low | Medium |
| VitesseO19112 | CAM | Low | Low |
| VitesseO19108 | LCM | Low | Low |
| PSVjong3 | LCM | Low | Low |
| PSVO19173 | RCM | Low | High |
| VitesseO19120 | RCM | Low | Low |
| VitesseO19111 | LB | Medium | Medium |
| PSVO19164 | LB | High | High |
| PSVO19214 | RB | High | High |
| VitesseO19116 | RB | Medium | Medium |
| PSVO19659 | LCB | High | High |
| VitesseO19114 | LCB | Medium | Medium |
| PSVO19224 | RCB | Medium | Medium |
| VitesseO19109 | RCB | High | Low |
The table summarises predictability values by position. Here is the key findings from the current project:
This could be due to their tactical requirements. Wingers, typically employed by 4-3-3 formation, are tasked with staying up wide and hugging the touchline to create space for teammates. This could limit their playing area and make their positioning more predictable.
This could also due to their tactical requirement/individual characteristics. Defensive-oriented fullbacks should be associated with high predictability due to its proximity to their defender centroid, whereas attacking-oriented ones exhibit low predictability. In the study of Memmert et al. (2017), full backs from Bayern Munich and FC Barcelona were considered less predictable, it might be possible to say that full backs from this project are more defensive oriented than the others.
Again, This could be due to their tactical roles, running in behind the defensive line, running wide to create space or even dropping down to control the game. Strikers with less predictable movements poses danger to the opponent.
One of the objectives of the project was to compare the ApEn values between the halves.
The plot shows there was a slight decline in the value of approximate entropy between two halves, which wasnt significant when you factor in the quantile of the distribution (see table 1). Most of player’s positioning predictability did not change between two halves. Initially, I expected to observe higher ApEn value in the second half, caused by unpredictable (out of position) movements due to external factors such as fatigue. However, only two players increased their ApEn (PSVO19223 & VitesseO19109), indicating such external factors may not affect player’s movement patterns and complexity. it is rather difficult to draw definitive conclusions about the impact of such factors on player movement patterns from this single match, though.

In summary, ApEn values can offer valuable insights into the tactical/individual behaviors of players, such as their defensive or attacking orientations, as well as their tactical roles and actions. When combined with additional contextual information, ApEn could be an effective performance indicator for evaluating tactical aspects of a player’s performance.
Small sample size: The data is from a single football match, hence lacks the generalisability of the result. Due to its small size, there is no baseline measure that would conclude the magnitude of approximate entropy values. For example, a midfielder had the value of 0.139, which is considered high relative to other players. Is that really high? given ApEn can range from 0 to infinity. It is necessary to analyze additional match data to establish a more reliable benchmark.
Contextual information: The analysis did not include contextual information which is the key to football performance. Further development of this project can include factors such as tactical change, formation change, substituion, scoreline and more. It is also valuable to see the ApEn values during attack and defence, may provide an insight into how players position themselves during the specific phase.
Memmert, D., Lemmink, K. A. P. M., & Sampaio, J. (2017). Current Approaches to Tactical Performance Analyses in Soccer using Position Data. Sports medicine, 47(1), 1-10.
Sampaio, J., & Maçãs V. (2012). Measuring tactical behaviour in football. Int J Sports Med, 33(5), 395-401.