Learn R Programming

HistDAWass (version 1.0.8)

crwtransform: Method crwtransform: returns the centers and the radii of bins of a distribution

Description

Centers and ranges calculation for bins of a histogram. It is useful for a very fast computation of statistics and methods based on the L2 Wassertein distance between histograms.

Usage

crwtransform(object)

# S4 method for distributionH crwtransform(object)

Value

A list containing

$Centers

The midpoints of the bins of the histogram

$Radii

The half-lenghts of the bins of the histogram

$Weights

The relative frequencies or the probailities associated with each bin (the sum is equal to 1)

Arguments

object

a distributionH object

Author

Antonio Irpino

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

Run this code

## ---- A mydist distribution ----
mydist <- distributionH(x = c(1, 2, 3, 10), p = c(0, 0.1, 0.5, 1))
## ---- Compute the cfd value for q=5 (not observed) ----
crwtransform(mydist)

Run the code above in your browser using DataLab