Definitionadvanced
Halfspace depth
Also called Tukey depth, location depth.
The depth of a point is the least number of data points in a closed halfspace that contains it. It orders multivariate data from the centre outward.
The halfspace depth of a point in a data set is the least number of data points in a closed halfspace that contains . A point deep inside the cloud has many points on every side, and a point outside the convex hull has depth 0. In one dimension it is the familiar rank depth of the median: the depth of is the smaller of the number of points at or below and the number at or above . Tukey proposed it in 1974 to draw bivariate data, and the deepest point is the Tukey median.
Definition
Let be a sample of points in ; points may repeat, and each copy counts. For a point , the halfspace depth of in is
where runs over the closed halfspaces that contain . A closed halfspace with on its boundary contains no more points than a larger parallel one, so it is enough to use the halfspaces with on the boundary:
Some authors divide by and use the fraction in . For a probability distribution on , the population depth is , and the sample depth divided by is the depth for the empirical distribution.
The depth region of level is . The maximal depth is , and a point with depth is a deepest point.
These facts follow from the definition.
- Affine invariance. For an invertible matrix and a vector , , because maps closed halfspaces onto closed halfspaces.
- Depth and the hull. if and only if is in the convex hull of . If is outside the hull, a hyperplane strictly separates from the hull, and the closed side of holds no point. If is in the hull and a closed halfspace held no data point, then all points would lie in the open complement of , and so would their convex combination .
- Regions are convex. is the intersection of all closed halfspaces that hold at least points. If for such an , then , and the closed halfspace holds and at most points, so . If by a direction , then at least points have , and a slightly lower level gives such an that misses . So each with is a compact convex set, and .
- Monotone along rays. If is a deepest point, the depth does not increase along each ray that starts at , because each region is convex and holds . The depth falls to 0 outside the hull. Zuo and Serfling (2000) take affine invariance, a maximum at a centre, this monotonicity and the vanishing at infinity as the axioms of a statistical depth function. Halfspace depth is their model case.
- The range of the maximal depth. . The lower bound is the centerpoint theorem, a consequence of Helly's theorem; the proof is on the Tukey median page. If the points are distinct, then . Take a hyperplane through that misses all data points other than . If is not a data point, the smaller closed side holds at most points. If is a data point, it holds at most other points plus , which is .
The depth of one point in the plane takes time (Rousseeuw and Ruts 1996). Sort the vectors by angle and slide a half-turn around the circle; the Tukey median page gives the algorithm and its proof. This is optimal: Aloupis and others (2002) prove an lower bound. In fixed dimension , exact algorithms take time (Dyckerhoff and Mozharovskyi 2016). When is part of the input, the problem is the densest hemisphere problem, which is NP-complete (Johnson and Preparata 1978). So in high dimension one uses the minimum over a finite set of random directions, which is an upper bound on the depth.
Examples and non-examples
One dimension. For the sample a closed halfspace is a closed half-line, so . The depths of the five points are , and the point 5 has depth . The deepest point is the median 4, with depth 3. For an even sample the deepest set is the whole median interval.
Seven points in the plane. Take
The depths of the seven data points are . For , the vectors in angle order are , , , , , , . Every half-open half-turn of directions holds at least 3 of them, and the half-turn that starts at holds exactly , and . So . A closed halfplane that shows it: the points on or below the line through with slope . It holds , and only. The maximal depth is , and is the segment from to . The point is far out, but it moves no part of off the diagonal. The Tukey median page builds step by step.
Points outside the hull. For the same , the point has depth 0: the closed halfplane holds it and holds no data point.
Non-example: the coordinatewise median. The coordinatewise median is not a deepest point in general, and it can have depth 0. For the three points , and in , the coordinatewise median is . It is not in the convex hull (the plane holds all three points), so its depth is 0. The deepest points are the triangle itself, at depth 1. The coordinatewise median is also not affine equivariant.
Non-example: the count in a ball. The number of data points within distance of is a density estimate, not a depth. It is large inside a dense cluster at the edge of the cloud, and it changes under a linear change of scale. Halfspace depth is large only near the centre of the whole cloud.
Related definitions
- Tukey median. The centre of gravity of the deepest region . Its breakdown point is at least for data in general position (Donoho and Gasko 1992).
- Centerpoint. A point of depth at least . It always exists; the Helly theorem page proves it.
- Convex hull peeling depth. The index of the convex layer that holds a point. It also orders points from the outside in, but it is not the same order as halfspace depth.
- Simplicial depth. Liu (1990): the number of simplices with vertices in the data that contain . It is another affine invariant depth, with a different deepest point.
- Geometric median. The minimizer of the sum of Euclidean distances. It has breakdown point 1/2, but it is only orthogonally equivariant, not affine equivariant.
- Empirical distribution function. In one dimension, .
References
- John W. Tukey, Mathematics and the picturing of data, in R. D. James (ed.), Proceedings of the International Congress of Mathematicians, Vancouver 1974, Volume 2, Canadian Mathematical Congress, Montreal, 1975, pp. 523 to 531, The whole paper (depth of a point as the least number of data points in a halfplane that contains it, used to draw bivariate data)
- David L. Donoho and Miriam Gasko, Breakdown properties of location estimates based on halfspace depth and projected outlyingness, The Annals of Statistics 20(4), 1992, pp. 1803 to 1827 (depth regions, the bound ceil(n/(d+1)) on the maximal depth, and the breakdown of the deepest point)
- Peter J. Rousseeuw and Ida Ruts, Algorithm AS 307: Bivariate location depth, Journal of the Royal Statistical Society, Series C (Applied Statistics) 45(4), 1996, pp. 516 to 526, The whole paper (the depth of one point in the plane in O(n log n) time by an angular sort)
- Yijun Zuo and Robert Serfling, General notions of statistical depth function, The Annals of Statistics 28(2), 2000, pp. 461 to 482 (the four properties of a depth function, and the halfspace depth as the model case)
- Greg Aloupis, Carmen Cortés, Francisco Gómez, Michael Soss and Godfried Toussaint, Lower bounds for computing statistical depth, Computational Statistics and Data Analysis 40(2), 2002, pp. 223 to 229, The whole paper (an Omega(n log n) lower bound for the halfspace depth of one point in the plane)
- David S. Johnson and Franco P. Preparata, The densest hemisphere problem, Theoretical Computer Science 6(1), 1978, pp. 93 to 107, The whole paper (the densest hemisphere problem is NP-complete when the dimension is part of the input)
- Rainer Dyckerhoff and Pavlo Mozharovskyi, Exact computation of the halfspace depth, Computational Statistics and Data Analysis 98, 2016, pp. 19 to 30, The whole paper (exact algorithms in O(n^d) and O(n^(d-1) log n) time in dimension d)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag NY6SD7 Edit this page History Report an error Markdown