Computes: the centroid
(simple average); and the geometric median, by minimum total distance.
In Fig. 1, with 10 random points, the two symbols show
the two solutions, in a rectangular region.
Minimization methods: (1) NM=Nelder-Mead,
(2) Pow=Powell, (3) CG, (4) BFGS, (5) LB=L-BFGS-B,
(6) TNC, (7) CL=COBYLA, (8) CQ=COBYQA,
(9) SL=SLSQP.
Using numerical minimization (instead of the classical
Weiszfeld algorithm) permits to determine the minimum sum of distances
raised to several given powers.
Shows the graphical results:
(a) region with random points, and
centroid as larger circle and
g. median as smaller circle; and
(b) random behavior of simulated variable. |
 Fig. 1 |