The objective is convex but not differentiable at the data points, and
that is the difficulty: the update divides by the distance to each
point, so landing exactly on one blows up. A point whose distance
underflows is skipped. tol is accepted and ignored – a fixed
iteration count is what makes the arms agree.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Weisz(V)
#> $estimate
#> [1] 4.5
#>
#> $cost
#> [1] 16
#>
#> $n
#> [1] 8
#>
#> $d
#> [1] 1
#>
#> $method
#> [1] "Weiszfeld iteration, geometric median"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
