View source: R/trimmedKBarycenter.R
trimmedKBarycenter | R Documentation |
Calculates a 2-Wasserstein k-barycenter of a list of multivariate normal distributions.
trimmedKBarycenter(k, alpha0, type.ini = "rnd", reps.list)
k |
Number k of elements in the k-barycenter. |
alpha0 |
Level of trimming. |
type.ini |
of initialization in c('rnd', 'plus-plus'). 'rnd' makes the common random initilaization while 'plus-plus' initializes in a similar fashion to k-means++. |
reps.list |
List of multivariate normals for which the trimmed k-barycenter should be performed. |
A list with values:
A double giving the Waserstein variation.
A list of k elements, each of which is a member of the k-barycenter. Each eement is a normal distribution characterized by a mean and a covariance.
The assignment of the original entries to each member of the k-barycenter.
normals <- list(list(mean = c(1, 1), cov = diag(2, 2)), list(mean = c(1, 1),cov = diag(1, 2)),
list(mean = c(3, 3), cov = diag(1, 2)))
trimmedKBarycenter(2, 0, 'rnd', normals)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.