# Recognizing Events in Spatiotemporal Soccer Data
## 1 Introduction  
Sports analytics can serve as a rich source of data for a variety of machine-learning tasks. Widely available sports-related datasets range from collections of individual players' performance indicators and historical game stats, to detailed event logs of particular matches. Recent advancements in object tracking technology have enabled sports analysts to collect spatiotemporal information, reflecting athletes' movements over time. Resulting spatiotemporal datasets have been used in numerous research tasks, including similar play sequences retrieval [1] and identification of defensive strategies [2] in basketball, and shot prediction in tennis [3]. In soccer, spatiotemporal datasets have been used to analyze team formations and play styles [4], as well as learning coordinated defensive strategies [5].  
Most available spatiotemporal sports datasets, to the best of our knowledge, are organized as sequences of game field snapshots that include athletes' locations at specific points of time. However, for many types of research projects, information about game events is also crucial. For example, in the case of team sports games (such as soccer, basketball, or rugby) it might be important to know, for example, which athlete is currently possessing the ball, whether a snapshot with a ball in the air belongs to a pass or a shot on goal sequence, and so on. One realistic scenario where such information is necessary is the development of a case-based reasoning AI system for playing a sports game [6]. The AI needs to learn actions performed by the athletes in specific game situations, so both these actions and situations must be reconstructed from a series of snapshots, contained in a dataset. Other possible applications of this kind of data are sports analytics and game visualization [7].  
In this work, we discuss the procedures we employ for the automatic detection of ball events in spatiotemporal soccer datasets. By using them, it is possible to extend existing datasets with information about player movements, ball possession, passes, shots on goals, and tackles, necessary for a variety of sports analysis-related tasks. Our primary goal is to ensure the simplicity and accuracy of the methods, and their easy integration into a dataset processing pipeline. Therefore, in mostcases, we rely on experts' knowledge of the game to define the explicit rules for detecting events instead of trying to extract those rules from the data. In addition, this approach helps to avoid overfitting, which might occur with machine learning-based models trained on insufficiently large datasets, common in sports analytics.  
This paper is organized as follows. The \"Background and Related Works\" section briefly discusses the traits of soccer spatiotemporal datasets available today. We note the widespread absence of event markup and examine existing approaches to generate it. We discuss the newest works in this area, which are mostly focused on application and evaluation of specific methods for event recognition. The \"Experimental Setup\" section provides a description of the datasets we use and their internal structure. We also define the specific list of events we are interested in, and note their properties. The next section titled \"Game Event Detection Pipeline\" discusses specific algorithms and rules used to detect each event type. Sufficient details are provided to recreate independent implementation, if necessary. The \"Event Detection Quality Evaluation\" section is dedicated to the analysis of the accuracy of the proposed approach. We report results independently for each of our datasets and estimate test accuracy using the \(F_{1}\) score. The final sections, the Discussion and Conclusion, restate our contribution. We show how the obtained results are connected with our initial goals, what the advantages and limitations of our approach are, and outline possible further research directions.