Learn R Programming

RiemBase (version 0.2.6)

rbase.robust: Robust Fréchet Mean of Manifold-valued Data

Description

Robust estimator for mean starts from dividing the data \(\{x_i\}_{i=1}^n\) into \(k\) equally sized sets. For each subset, it first estimates Fréchet mean. It then follows a step to aggregate \(k\) sample means by finding a geometric median.

Usage

rbase.robust(input, k = 5, maxiter = 496, eps = 1e-06, parallel = FALSE)

Value

a named list containing

x

an estimate geometric median.

iteration

number of iterations until convergence.

Arguments

input

a S3 object of riemdata class. See riemfactory for more details.

k

number of subsets for which the data be divided into.

maxiter

maximum number of iterations for gradient descent algorithm and Weiszfeld algorithm.

eps

stopping criterion for the norm of gradient.

parallel

a flag for enabling parallel computation.

Author

Kisung You

References

2011arXiv1112.3914LRiemBase

2013arXiv1308.1334MRiemBase

2014arXiv1409.5937FRiemBase

See Also

rbase.mean, rbase.median

Examples

Run this code
# \donttest{
### Generate 100 data points on Sphere S^2 near (0,0,1).
ndata = 100
theta = seq(from=-0.99,to=0.99,length.out=ndata)*pi
tmpx  = cos(theta) + rnorm(ndata,sd=0.1)
tmpy  = sin(theta) + rnorm(ndata,sd=0.1)

### Wrap it as 'riemdata' class
data  = list()
for (i in 1:ndata){
  tgt = c(tmpx[i],tmpy[i],1)
  data[[i]] = tgt/sqrt(sum(tgt^2)) # project onto Sphere
}
data = riemfactory(data, name="sphere")

### Compute Robust Fréchet Mean
out1 = rbase.robust(data)
out2 = rbase.robust(data,parallel=TRUE) # test parallel implementation
# }

Run the code above in your browser using DataLab