WH.vec.mean-methods: Method WH.vec.mean

WH.vec.meanR Documentation

Method WH.vec.mean

Description

Compute a histogram that is the weighted mean of the set of histograms contained in a MatH object, i.e. a matrix of histograms, consistent with a set of distributions equipped with a L2 wasserstein metric.

Usage

WH.vec.mean(object, ...)

## S4 method for signature 'MatH'
WH.vec.mean(object, w = numeric(0))

Arguments

object

a MatH object

...

optional arguments

w

it is possible to add a vector of weights (positive numbers) having the same size of the MatH object, default = equal weights for all

Value

a distributionH object, i.e. a histogram

Examples

hmean <- WH.vec.mean(BLOOD)
# generate a set of random weights
RN <- runif(get.MatH.nrows(BLOOD) * get.MatH.ncols(BLOOD))
hmean <- WH.vec.mean(BLOOD, w = RN)

Airpino/HistDAWass documentation built on Jan. 30, 2024, 7:53 p.m.