
Find a torus base point via multi-start optimization.
Source:R/manifold-torus.R
optimize_base_point_torus.RdTorus case of optimize_base_point: numerically minimizes
the total torus distance (dist_torus) from a candidate
point p to every row of X, searching over the box
\([0,1]^d\) with restarts drawn uniformly in it. See
choose_base_point.
Arguments
- X
A matrix or data frame of torus data in \([0,1)^d\); rows are samples, columns are coordinates.
- n_start
Number of random restarts used to avoid local minima of the (non-convex) objective. Defaults to 10.
- maxit
Maximum number of
optimiterations per restart. Defaults to 200.- seed
Integer random seed used to generate the restart points, for reproducibility. Defaults to 42.
Value
A list with three elements: p (the best point found
across all restarts, clamped to \([0,1]^d\)), value (its
total torus distance to the rows of X), and convergence
(the optim convergence code of the best restart;
0 indicates successful convergence).