crwtransform-methods: Centres, radii and weights of the bins of a histogram

crwtransformR Documentation

Centres, radii and weights of the bins of a histogram

Description

Computes the centre (midpoint), the radius (half-width) and the weight (probability) of each bin of a distributionH object. This representation allows a fast computation of the statistics based on the L2 Wasserstein distance.

Usage

crwtransform(object)

Arguments

object

A distributionH object.

Value

A list with three numeric vectors: Centers, the midpoints of the bins; Radii, the half-widths of the bins; Weights, the probabilities of the bins (summing to one).

References

Irpino, A., Verde, R., Lechevallier, Y. (2006) Dynamic clustering of histograms using Wasserstein metric, In: Proceedings of COMPSTAT 2006, Physica-Verlag, 869-876.

Examples

mydist <- distributionH(x = c(1, 2, 3, 10), p = c(0, 0.1, 0.5, 1))
crwtransform(mydist)

HistDAWass documentation built on Oct. 29, 2026, 5:07 p.m.