Functional Depths

The depth concept, in classical multivariate statistics, was used to measure the centrality of a point *x* ∈ R*<sup>d</sup>* within a data set. The points nearest to the centre obtain a higher depth value [36]. With a functional approach, depths measure the centrality of a curve in relation to the other curves of the sample *x*1, ... , *xn*, coming from a stochastic process X(·) evaluated at a specific interval [*a*, *b*] ∈ R [37,38].

Although there exist different functional types of depths (Fraiman-Muniz [37], h-modal [39] or Random Projections [38]), the most widely used is the h-modal depth due to its better performance in the correct detection of outliers [36]. Therefore, the functional mode of the sample will be the curve most densely surrounded by other curves. The functional depth of a certain curve in a specific sample is calculated as follows:

$$MD\_{\boldsymbol{n}}(\mathbf{x}\_{i\prime}\boldsymbol{h}) = \sum\_{\boldsymbol{w}=\boldsymbol{1}}^{\boldsymbol{n}} \mathcal{K}(\frac{||\mathbf{x}\_{i} - \mathbf{x}\_{\boldsymbol{w}}\boldsymbol{\varepsilon}||}{\boldsymbol{h}}) \tag{4}$$

where ||·|| is the norm in a functional space, *K* : R<sup>+</sup> → R<sup>+</sup> is a kernel function, and *h* represents the bandwidth parameter [39].

Functional depths, which are considered as a measure of dispersion, are essential in the detection of outliers. In any data analysis, the identification of these atypical data is crucial because they could affect the subsequent estimations. In addition, examining them is important to discover the causes that give these observations a different behaviour from the rest. Besides, in functional analyses, it is even more important because it is possible that individually, the values that form the curve are not outliers in a vectorial way but, from a functional point of view, the entire curve could be [36,40]. Martínez et al. [29] explained in detail how to detect functional outliers within a functional sample.
