trimmedKBarycenter: trimmedKBarycenter

Description Usage Arguments Value Examples

View source: R/trimmedKBarycenter.R

Description

Calculates a 2-Wasserstein k-barycenter of a list of multivariate normal distributions.

Usage

1
trimmedKBarycenter(k, alpha0, type.ini = "rnd", reps.list)

Arguments

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.

Value

A list with values:

variacion_wasser

A double giving the Waserstein variation.

baricentro

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.

cluster

The assignment of the original entries to each member of the k-barycenter.

Examples

1
2
3
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)

optimalFlow documentation built on Nov. 8, 2020, 6:59 p.m.