Geometric median
In geometry, the geometric median of a discrete point set in a Euclidean space is the point minimizing the sum of distances to the sample points. This generalizes the median, which has the property of minimizing the sum of distances or absolute differences for one-dimensional data. It is also known as the spatial median,[1] Euclidean minisum point,[1] Torricelli point, [2] or 1-median. It provides a measure of central tendency in higher dimensions and it is a standard problem in facility location, i.e., locating a facility to minimize the cost of transportation.[3]
The geometric median is an important estimator of location in statistics,[4] because it minimizes the sum of the L2 distances of the samples.[5] It is to be compared to the mean, which minimizes the sum of the squared L2 distances; and to the coordinate-wise median which minimizes the sum of the L1 distances. The more general k-median problem asks for the location of k cluster centers minimizing the sum of L2 distances from each sample point to its nearest center.
The special case of the problem for three points in the plane (that is, m = 3 and n = 2 in the definition below) is sometimes also known as Fermat's problem; it arises in the construction of minimal Steiner trees, and was originally posed as a problem by Pierre de Fermat and solved by Evangelista Torricelli.[6] Its solution is now known as the Fermat point of the triangle formed by the three sample points.[7] The geometric median may in turn be generalized to the problem of minimizing the sum of weighted distances, known as the Weber problem after Alfred Weber's discussion of the problem in his 1909 book on facility location.[1] Some sources instead call Weber's problem the Fermat–Weber problem,[8] but others use this name for the unweighted geometric median problem.[9]
Wesolowsky (1993) provides a survey of the geometric median problem. See Fekete, Mitchell & Beurer (2005) for generalizations of the problem to non-discrete point sets.
Definition
[edit]Formally, for a given set of m points with each , the geometric median is defined as the sum of the L2 distances minimizer
Here, arg min means the value of the argument which minimizes the sum. In this case, it is the point in n-dimensional Euclidean space from where the sum of all Euclidean distances to the 's is minimum.
Properties
[edit]- For the 1-dimensional case, the geometric median coincides with the median. This is because the univariate median also minimizes the sum of distances from the points. (More precisely, if the points are p1, ..., pn, in that order, the geometric median is the middle point if n is odd, but is not uniquely determined if n is even, when it can be any point in the line segment between the two middling points and .) [10][11]
- The geometric median is unique whenever the points are not collinear.[12]
- The geometric median is equivariant for Euclidean similarity transformations, including translation and rotation.[13][10] This means that one would get the same result either by transforming the geometric median, or by applying the same transformation to the sample data and finding the geometric median of the transformed data. This property follows from the fact that the geometric median is defined only from pairwise distances, and does not depend on the system of orthogonal Cartesian coordinates by which the sample data is represented. In contrast, the component-wise median for a multivariate data set is not in general rotation invariant, nor is it independent of the choice of coordinates.[13]
- The geometric median has a breakdown point of 0.5.[13] That is, up to half of the sample data may be arbitrarily corrupted, and the median of the samples will still provide a robust estimator for the location of the uncorrupted data.
Special cases
[edit]- For 3 (non-collinear) points, if any angle of the triangle formed by those points is 120° or more, then the geometric median is the point at the vertex of that angle. If all the angles are less than 120°, the geometric median is the point inside the triangle which subtends an angle of 120° to each three pairs of triangle vertices.[10] This is also known as the Fermat point of the triangle formed by the three vertices. (If the three points are collinear then the geometric median is the point between the two other points, as is the case with a one-dimensional median.)
- For 4 coplanar points, if one of the four points is inside the triangle formed by the other three points, then the geometric median is that point. Otherwise, the four points form a convex quadrilateral and the geometric median is the crossing point of the diagonals of the quadrilateral. The geometric median of four coplanar points is the same as the unique Radon point of the four points.[14]
Computation
[edit]Despite the geometric median's being an easy-to-understand concept, computing it poses a challenge. The centroid or center of mass, defined similarly to the geometric median as minimizing the sum of the squares of the distances to each point, can be found by a simple formula — its coordinates are the averages of the coordinates of the points — but it has been shown that no explicit formula, nor an exact algorithm involving only arithmetic operations and kth roots, can exist in general for the geometric median. Therefore, only numerical or symbolic approximations to the solution of this problem are possible under this model of computation.[15]
However, it is straightforward to calculate an approximation to the geometric median using an iterative procedure in which each step produces a more accurate approximation. Procedures of this type can be derived from the fact that the sum of distances to the sample points is a convex function, since the distance to each sample point is convex and the sum of convex functions remains convex. Therefore, procedures that decrease the sum of distances at each step cannot get trapped in a local optimum.
One common approach of this type, called Weiszfeld's algorithm after the work of Endre Weiszfeld,[16] is a form of iteratively re-weighted least squares. This algorithm defines a set of weights that are inversely proportional to the distances from the current estimate to the sample points, and creates a new estimate that is the weighted average of the sample according to these weights. That is,
This method converges for almost all initial positions, but may fail to converge when one of its estimates falls on one of the given points. It can be modified to handle these cases so that it converges for all initial points.[12]
Bose, Maheshwari & Morin (2003) describe more sophisticated geometric optimization procedures for finding approximately optimal solutions to this problem. Cohen et al. (2016) show how to compute the geometric median to arbitrary precision in nearly linear time. Note also that the problem can be formulated as the second-order cone program
which can be solved in polynomial time using common optimization solvers.
Characterization of the geometric median
[edit]If y is distinct from all the given points, xi, then y is the geometric median if and only if it satisfies:
This is equivalent to:
which is closely related to Weiszfeld's algorithm.
In general, y is the geometric median if and only if there are vectors ui such that:
where for xi ≠ y,
and for xi = y,
An equivalent formulation of this condition is
It can be seen as a generalization of the median property, in the sense that any partition of the points, in particular as induced by any hyperplane through y, has the same and opposite sum of positive directions from y on each side. In the one dimensional case, the hyperplane is the point y itself, and the sum of directions simplifies to the (directed) counting measure.
Generalizations
[edit]The geometric median can be generalized from Euclidean spaces to general Riemannian manifolds (and even metric spaces) using the same idea which is used to define the Fréchet mean on a Riemannian manifold.[17][18] Let be a Riemannian manifold with corresponding distance function , let be weights summing to 1, and let be observations from . Then we define the weighted geometric median (or weighted Fréchet median) of the data points as
- .
If all the weights are equal, we say simply that is the geometric median.
See also
[edit]Notes
[edit]- ^ a b c Drezner et al. (2002)
- ^ Cieslik (2006).
- ^ Eiselt & Marianov (2011).
- ^ Lawera & Thompson (1993).
- ^ Dodge & Rousson (1999).
- ^ Krarup & Vajda (1997).
- ^ Spain (1996).
- ^ Brimberg (1995).
- ^ Bose, Maheshwari & Morin (2003).
- ^ a b c Haldane (1948)
- ^ Claim 18.10, Geometric Methods and Optimization Problems, V. Boltyanski, H. Martini, V. Soltan, Springer, 1999.
- ^ a b Vardi & Zhang (2000)
- ^ a b c Lopuhaä & Rousseeuw (1991)
- ^ Cieslik (2006), p. 6; Plastria (2006). The convex case was originally proven by Giovanni Fagnano.
- ^ Bajaj (1986); Bajaj (1988). Earlier, Cockayne & Melzak (1969) proved that the Steiner point for 5 points in the plane cannot be constructed with ruler and compass
- ^ Weiszfeld (1937); Kuhn (1973); Chandrasekaran & Tamir (1989).
- ^ Fletcher, P. Thomas; Venkatasubramanian, Suresh; Joshi, Sarang (23 June 2008). "Robust statistics on Riemannian manifolds via the geometric median". 2008 IEEE Conference on Computer Vision and Pattern Recognition. IEEE Conference on Computer Vision and Pattern Recognition. Anchorage, AK, USA: IEEE.
- ^ Fletcher, Venkatasubramanian & Joshi (2009).
References
[edit]- Bajaj, Chanderjit (1986). "Proving geometric algorithms nonsolvability: An application of factoring polynomials". Journal of Symbolic Computation. 2: 99–102. doi:10.1016/S0747-7171(86)80015-3.
- Bajaj, Chanderjit (1988). "The algebraic degree of geometric optimization problems". Discrete & Computational Geometry. 3 (2): 177–191. doi:10.1007/BF02187906.
- Bose, Prosenjit; Maheshwari, Anil; Morin, Pat (2003). "Fast approximations for sums of distances, clustering and the Fermat–Weber problem". Computational Geometry: Theory and Applications. 24 (3): 135–146. doi:10.1016/S0925-7721(02)00102-5.
- Brimberg, J. (1995). "The Fermat–Weber location problem revisited". Mathematical Programming. 71 (1, Ser. A): 71–76. doi:10.1007/BF01592245. MR 1362958. S2CID 206800756.
- Chandrasekaran, R.; Tamir, A. (1989). "Open questions concerning Weiszfeld's algorithm for the Fermat-Weber location problem". Mathematical Programming. Series A. 44 (1–3): 293–295. doi:10.1007/BF01587094. S2CID 43224801.
- Cieslik, Dietmar (2006). Shortest Connectivity: An Introduction with Applications in Phylogeny. Combinatorial Optimization. Vol. 17. Springer. p. 3. ISBN 9780387235394.
- Cockayne, E. J.; Melzak, Z. A. (1969). "Euclidean constructability in graph minimization problems". Mathematics Magazine. 42 (4): 206–208. doi:10.2307/2688541. JSTOR 2688541.
- Cohen, Michael; Lee, Yin Tat; Miller, Gary; Pachocki, Jakub; Sidford, Aaron (2016). "Geometric median in nearly linear time" (PDF). Proc. 48th Symposium on Theory of Computing (STOC 2016). Association for Computing Machinery. pp. 9–21. arXiv:1606.05225. doi:10.1145/2897518.2897647. ISBN 978-1-4503-4132-5.
- Dodge, Yadolah; Rousson, Valentin (September 1999). "Multivariate L1 mean". Metrika. 49 (2): 127–134. doi:10.1007/s001840050029.L1 mean&rft.volume=49&rft.issue=2&rft.pages=127-134&rft.date=1999-09&rft_id=info:doi/10.1007/s001840050029&rft.aulast=Dodge&rft.aufirst=Yadolah&rft.au=Rousson, Valentin&rfr_id=info:sid/en.wikipedia.org:Geometric median" class="Z3988">
- Drezner, Zvi; Klamroth, Kathrin; Schöbel, Anita; Wesolowsky, George O. (2002). "The Weber problem". Facility Location: Applications and Theory. Springer, Berlin. pp. 1–36. ISBN 9783540213451. MR 1933966.
- Eiselt, H. A.; Marianov, Vladimir (2011). Foundations of Location Analysis. International Series in Operations Research & Management Science. Vol. 155. Springer. p. 6. ISBN 9781441975720.
- Fekete, Sándor P.; Mitchell, Joseph S. B.; Beurer, Karin (2005). "On the continuous Fermat-Weber problem". Operations Research. 53 (1): 61–76. arXiv:cs.CG/0310027. doi:10.1287/opre.1040.0137. S2CID 1121.
- Fletcher, P. Thomas; Venkatasubramanian, Suresh; Joshi, Sarang (2009). "The geometric median on Riemannian manifolds with application to robust atlas estimation". NeuroImage. 45 (1 Suppl): s143–s152. doi:10.1016/j.neuroimage.2008.10.052. PMC 2735114. PMID 19056498.
- Haldane, J. B. S. (1948). "Note on the median of a multivariate distribution". Biometrika. 35 (3–4): 414–417. doi:10.1093/biomet/35.3-4.414.
- Krarup, Jakob; Vajda, Steven (1997). "On Torricelli's geometrical solution to a problem of Fermat". IMA Journal of Mathematics Applied in Business and Industry. 8 (3): 215–224. doi:10.1093/imaman/8.3.215. MR 1473041.
- Kuhn, Harold W. (1973). "A note on Fermat's problem". Mathematical Programming. 4 (1): 98–107. doi:10.1007/BF01584648. S2CID 22534094.
- Lawera, Martin; Thompson, James R. (1993). "Some problems of estimation and testing in multivariate statistical process control" (PDF). Proceedings of the 38th Conference on the Design of Experiments. U.S. Army Research Office Report. Vol. 93–2. pp. 99–126. Archived from the original on May 17, 2014.
- Lopuhaä, Hendrick P.; Rousseeuw, Peter J. (1991). "Breakdown points of affine equivariant estimators of multivariate location and covariance matrices". Annals of Statistics. 19 (1): 229–248. doi:10.1214/aos/1176347978. JSTOR 2241852.
- Nie, Jiawang; Parrilo, Pablo A.; Sturmfels, Bernd (2008). "Semidefinite representation of the k-ellipse". In Dickenstein, A.; Schreyer, F.-O.; Sommese, A.J. (eds.). Algorithms in Algebraic Geometry. IMA Volumes in Mathematics and its Applications. Vol. 146. Springer-Verlag. pp. 117–132. arXiv:math/0702005. Bibcode:2007math......2005N. doi:10.1007/978-0-387-75155-9_7. ISBN 978-0-387-75154-2. S2CID 16558095.k-ellipse&rft.btitle=Algorithms in Algebraic Geometry&rft.series=IMA Volumes in Mathematics and its Applications&rft.pages=117-132&rft.pub=Springer-Verlag&rft.date=2008&rft_id=https://api.semanticscholar.org/CorpusID:16558095#id-name=S2CID&rft_id=info:bibcode/2007math......2005N&rft_id=info:arxiv/math/0702005&rft_id=info:doi/10.1007/978-0-387-75155-9_7&rft.isbn=978-0-387-75154-2&rft.aulast=Nie&rft.aufirst=Jiawang&rft.au=Parrilo, Pablo A.&rft.au=Sturmfels, Bernd&rfr_id=info:sid/en.wikipedia.org:Geometric median" class="Z3988">
- Ostresh, L. (1978). "Convergence of a class of iterative methods for solving Weber location problem". Operations Research. 26 (4): 597–609. doi:10.1287/opre.26.4.597.
- Plastria, Frank (2006). "Four-point Fermat location problems revisited. New proofs and extensions of old results" (PDF). IMA Journal of Management Mathematics. 17 (4): 387–396. doi:10.1093/imaman/dpl007. Zbl 1126.90046. Archived from the original (PDF) on 2016-03-04. Retrieved 2014-05-18..
- Spain, P. G. (1996). "The Fermat point of a triangle". Mathematics Magazine. 69 (2): 131–133. doi:10.1080/0025570X.1996.11996409. JSTOR 2690672?origin=pubexport. MR 1573157.
- Vardi, Yehuda; Zhang, Cun-Hui (2000). "The multivariate L1-median and associated data depth". Proceedings of the National Academy of Sciences of the United States of America. 97 (4): 1423–1426 (electronic). Bibcode:2000PNAS...97.1423V. doi:10.1073/pnas.97.4.1423. MR 1740461. PMC 26449. PMID 10677477.L1-median and associated data depth&rft.volume=97&rft.issue=4&rft.pages=1423-1426 (electronic)&rft.date=2000&rft_id=https://www.ncbi.nlm.nih.gov/pmc/articles/PMC26449#id-name=PMC&rft_id=https://mathscinet.ams.org/mathscinet-getitem?mr=1740461#id-name=MR&rft_id=info:bibcode/2000PNAS...97.1423V&rft_id=info:pmid/10677477&rft_id=info:doi/10.1073/pnas.97.4.1423&rft.aulast=Vardi&rft.aufirst=Yehuda&rft.au=Zhang, Cun-Hui&rft_id=https://www.ncbi.nlm.nih.gov/pmc/articles/PMC26449&rfr_id=info:sid/en.wikipedia.org:Geometric median" class="Z3988">
- Weber, Alfred (1909). Über den Standort der Industrien, Erster Teil: Reine Theorie des Standortes (in German). Tübingen: Mohr.
- Wesolowsky, G. (1993). "The Weber problem: History and perspective". Location Science. 1: 5–23.
- Weiszfeld, E. (1937). "Sur le point pour lequel la somme des distances de n points donnes est minimum". Tohoku Mathematical Journal (in French). 43: 355–386.n points donnes est minimum&rft.volume=43&rft.pages=355-386&rft.date=1937&rft.aulast=Weiszfeld&rft.aufirst=E.&rft_id=https://www.jstage.jst.go.jp/article/tmj1911/43/0/43_0_355/_article/-char/en&rfr_id=info:sid/en.wikipedia.org:Geometric median" class="Z3988"> Translated into English as Weiszfeld, E.; Plastria, Frank (April 2008). "On the point for which the sum of the distances to n given points is minimum". Annals of Operations Research. 167 (1): 7–41. doi:10.1007/s10479-008-0352-z. S2CID 21000317.n given points is minimum&rft.volume=167&rft.issue=1&rft.pages=7-41&rft.date=2008-04&rft_id=info:doi/10.1007/s10479-008-0352-z&rft_id=https://api.semanticscholar.org/CorpusID:21000317#id-name=S2CID&rft.aulast=Weiszfeld&rft.aufirst=E.&rft.au=Plastria, Frank&rfr_id=info:sid/en.wikipedia.org:Geometric median" class="Z3988">