MultivariateStatistics`
MultivariateStatistics`

SpatialMedian

As of Version 11.1, SpatialMedian is part of the built-in Wolfram Language kernel.

SpatialMedian[matrix]

gives the spatial median of the elements in matrix.

Details and Options

  • To use SpatialMedian, you first need to load the Multivariate Statistics Package using Needs["MultivariateStatistics`"].
  • SpatialMedian[matrix] gives the vector minimizing the sum of Euclidean distances from to the elements of matrix.

Examples

Basic Examples  (1)

Spatial median for trivariate data:

Wolfram Research (2007), SpatialMedian, Wolfram Language function, https://reference.wolfram.com/language/MultivariateStatistics/ref/SpatialMedian.html.

Text

Wolfram Research (2007), SpatialMedian, Wolfram Language function, https://reference.wolfram.com/language/MultivariateStatistics/ref/SpatialMedian.html.

CMS

Wolfram Language. 2007. "SpatialMedian." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/MultivariateStatistics/ref/SpatialMedian.html.

APA

Wolfram Language. (2007). SpatialMedian. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/MultivariateStatistics/ref/SpatialMedian.html

BibTeX

@misc{reference.wolfram_2024_spatialmedian, author="Wolfram Research", title="{SpatialMedian}", year="2007", howpublished="\url{https://reference.wolfram.com/language/MultivariateStatistics/ref/SpatialMedian.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_spatialmedian, organization={Wolfram Research}, title={SpatialMedian}, year={2007}, url={https://reference.wolfram.com/language/MultivariateStatistics/ref/SpatialMedian.html}, note=[Accessed: 22-November-2024 ]}