
Find a hyperbolic base point via multi-start optimization.
Source:R/manifold-hyperbolic.R
optimize_base_point_hyperbolic.RdHyperbolic case of optimize_base_point: numerically
minimizes the total hyperbolic distance (dist_hyperbolic)
from a candidate point p to every row of X. The search is
unconstrained, over the tangent space at the Lorentzian centroid
(auto_base_point_hyperbolic), with restarts drawn from a
Gaussian scaled to the spread of the data. See
choose_base_point.
Arguments
- X
A matrix or data frame of points on the hyperboloid; rows are samples, with
d + 1columns.- 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, on the hyperboloid), value (its total
hyperbolic distance to the rows of X), and convergence
(the optim convergence code of the best restart;
0 indicates successful convergence).
Examples
X <- exp_map_hyperbolic(matrix(rnorm(20), nrow = 10, ncol = 2))
optimize_base_point_hyperbolic(X, n_start = 5)
#> $p
#> [1] 1.1809631 0.5031822 0.3761403
#>
#> $value
#> [1] 10.85483
#>
#> $convergence
#> [1] 0
#>