Returns the index of a single deterministic peripheral seed, the starting
point used by Gonzalez() under the corresponding seed strategy. Useful
when composing a custom selection pass.
Usage
MaxMinSeed(
d = NULL,
points = NULL,
method = c("peripheral", "centroid", "random_furthest", "diameter", "anti_medoid",
"medoid", "rowsum", "rownorm")
)Arguments
- d
A
distobject or square symmetric numeric matrix. Ignored whenpointsis supplied.- points
Optional
N x dimnumeric coordinate matrix; when supplied the seed is computed from coordinates inO(N)memory. Required for the"centroid"anchor, which has no distance-matrix form.- method
Anchor name (see above). Default
"peripheral".
Details
Anchors:
"centroid"The point farthest from the coordinate mean (
argmax ||x - x_bar||), anO(N * dim)approximate diameter endpoint. Computed from coordinates, so it requirespoints; it is unavailable on the distance-matrix path, where"peripheral"serves the same role."peripheral"Two sweeps: the point furthest from point 1, then the point furthest from that (a diameter-endpoint approximation), in
O(N). The only anchor reachable from a distance-column oracle (the function path ofGonzalez())."random_furthest"The point furthest from a random pivot, in
O(N). The pivot is drawn from a fixed internal seed, isolated from the ambient RNG, so the index is reproducible across sessions and machines."diameter"A row endpoint of the diameter pair (the maximum pairwise distance). Degenerate data (
d_max <= 0) falls back to 1."anti_medoid"The point furthest from the 1-median (medoid).
"medoid"The 1-median itself,
which.min(rowSums(d))."rowsum"The point maximising the sum of distances to all others (the 1-anti-median).
"rownorm"The point maximising
sqrt(sum d^2), the L2 counterpart of"rowsum".
See also
Gonzalez(), which seeds and runs the greedy pass in one call.