trimmedKBarycenter: trimmedKBarycenter

View source: R/trimmedKBarycenter.R

trimmedKBarycenterR Documentation

trimmedKBarycenter

Description

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

Usage

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

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)


HristoInouzhe/optimalFlow documentation built on April 23, 2023, 5:45 p.m.