# riem.seb: Find the Smallest Enclosing Ball In Riemann: Learning with Data on Riemannian Manifolds

 riem.seb R Documentation

## Find the Smallest Enclosing Ball

### Description

Given N observations X_1, X_2, …, X_N \in \mathcal{M}, find the smallest enclosing ball.

### Usage

riem.seb(riemobj, method = c("aa2013"), ...)


### Arguments

 riemobj a S3 "riemdata" class for N manifold-valued data. method (case-insensitive) name of the algorithm to be used as follows; "aa2013"Arnaudon and Nielsen (2013). ... extra parameters including maxitermaximum number of iterations to be run (default:50). epstolerance level for stopping criterion (default: 1e-5).

### Value

a named list containing

center

a matrix on \mathcal{M} that minimizes the radius.

the minimal radius with respect to the center.

### References

\insertRef

\insertRef

arnaudon_approximating_2013Riemann

### Examples

#-------------------------------------------------------------------
#       Euclidean Example : samples from Standard Normal in R^2
#-------------------------------------------------------------------
## GENERATE 25 OBSERVATIONS FROM N(0,I)
ndata  = 25
mymats = array(0,c(ndata, 2))
mydata = list()
for (i in 1:ndata){
mydata[[i]] = stats::rnorm(2)
mymats[i,]  = mydata[[i]]
}
myriem = wrap.euclidean(mydata)

## COMPUTE
sebobj = riem.seb(myriem)
center = as.vector(sebobj$center) radius = sebobj$radius

## VISUALIZE
#  1. prepare the circle for drawing
theta  = seq(from=0, to=2*pi, length.out=100)
coords = coords + matrix(rep(center, each=100), ncol=2)

#  2. draw