# Functional Data Analysis in Sport Science: Example of Swimmers' Progression Curves Clustering
## 1 Introduction
### Functional Data Analysis (FDA)  
As mentioned previously, FDA allows for taking into account the intrinsic nature of functional data. Apart from this philosophical advantage in terms of modelling, one may note important benefits. For example, if one records several time series with observations at different instants and/or in different numbers, how can they be compared? How can the evolution of performances of swimmers from their competition times at given ages be studied? Competitors may have different numbers of races during their careers, and their performances are done at different ages (if one wants to avoid age discretization that have been shown problematic in [23]). This example illustrates exactly what we try to deal with in the subsequent curve clustering example. Another fundamental advantage of FDA is the possibility to work on the derivatives of the observed functions. Indeed, it is often interesting to study the dynamic of a time dependent process. Even the second derivative, often referred as the _acceleration_, or a superior order derivative might provide valuable information in practice. The specific nature of functional data allows for studying such properties, and the sport scientist may easily imagine the wide range of situations on which the study of derivatives might be interesting. One could think for example of the GPS position tracking analysis, the progression phenomenon of young athletes, or the following of the actions of some muscles over time. The first and fundamental step of a functional data analysis generally consists in the reconstruction of the function from the discrete set of observations. There are two cases at this step. Whether the observations are being considered as error-less (in term of measurement) and one can proceed to a direct interpolation through one of the multiple existing methods (linear, polynomial,...), or, more frequently, the set \(x_{i,t_{1}},\ldots,x_{i,t_{n}}\) is considered as observations at time \(t_{1},\ldots,t_{n}\) of a realisation \(x_{i}(t)\) of a stochastic process \(X(t)\). In this case, one can proceed to a _smoothing_ step. It consists of the approximation of a function defined to be _close_ to the observed points. To deal with noisy data, one always has to face the over-fitting/under-fitting issue. In most cases, one has to determine a smoothing parameter that defines how much one wants to allow the function to contain _peaks_. These topics are largely detailed in the first chapters of [27]. Even if defining a consistent value of the smoothing parameter is a first work, one can see as an advantage the fact to explicitly control the signal-to-noise ratio of the data. The most common way to reconstruct the function from the observations is to use a basis of functions. A basis of functions is a set of specific functions \(\phi_{i}\) of a functional space \(\mathcal{S}\), such as each element of \(\mathcal{S}\) being able to be defined as a linear combination of the \(\phi_{i}\). Formally, we can define the basis expansion \(f\) as:  
\[f(t)=\sum_{i=1}^{N}\alpha_{i}\,\phi_{i}(t), \tag{1}\]  
where \(\phi_{1},\ldots,\phi_{N}\) are the basis functions of a given functional space and \(\alpha_{1},\ldots,\alpha_{N}\) are real valued coefficients. Intuitively, if one fixes a common basis to fit observations, the information on individuals is contained in the vector of coefficients \(\{\alpha_{1},\ldots,\alpha_{N}\}\). This is why a common approach is to perform classical multivariate methods on these coefficients. Among the most common bases used in practice, we can cite Fourier basis and wavelets, which are well suited to model periodic data [27; 28]. Fourier basis is a widespread choice that works well when data present a repetitive pattern (such as day/night cycles for example) since the basis functions are sinusoids. However, their efficiencies decrease when data are less regular, especially on the modelisation of derivatives. Wavelet basis is designed to settle this sensibility to irregular signals.