# SpatialMedian

SpatialMedian[{x1,x2,}]

gives the spatial median of the elements .

SpatialMedian[data]

gives the spatial median for several different forms of data.

# Details and Options  • SpatialMedian is also known as geometric median, median center and 1-median.
• SpatialMedian is a robust location measure. It gives a point with minimum total distance to every point in the data.
• SpatialMedian is equivalent to for the unweighted case and for the weighted case.
• • The data data has the following forms and interpretations:
•  {x1,x2,…} univariate numerical data {{x1,y1,…},{x2,y2,…},…} multivariate numerical data {GeoPosition[…],GeoPosition[…],…} list of geodetic positions GeoPosition[…] array of geodetic positions WeightedData[…] data with weights
• Under Euclidean distance, SpatialMedian coincides with median in the one-dimensional case. In the multidimensional case, spatial median is unique whenever the points are not collinear.
• The following options can be given:
•  AccuracyGoal Automatic the accuracy sought DistanceFunction Automatic the distance metric to use MaxIterations Automatic maximum number of iterations to use Method Automatic method to use PrecisionGoal Automatic the precision sought WorkingPrecision Automatic the precision used in internal computations
• By default, the following distance functions are used for different types of elements:
•  EuclideanDistance numeric data GeoDistance geospatial data
• The setting Method{"InitialPoint"{x0,y0,}} allows for a custom initial point for computing SpatialMedian.

# Examples

open all close all

## Basic Examples(3)

Find the spatial median of a list of vectors:

 In:= Out= Find the spatial median of a list of vectors with given weights:

 In:= Out= Compute the spatial median of geo locations:

 In:= In:= Out= In:= Out= ## Properties & Relations(5)

Introduced in 2017
(11.1)