Learn R Programming

HistDAWass (version 1.0.3)

register: Method register

Description

Given two distributionH objects, it returns two equivalent distributions such that they share the same cdf values. This function is useful for computing basic statistics.

Usage

register(object1, object2)

# S4 method for distributionH,distributionH register(object1, object2)

Arguments

object1

A distributionH object

object2

A distributionH object

Value

The two distributionH objects in input sharing the same cdf (the p slot)

References

Irpino, A., Lechevallier, Y. and Verde, R. (2006): Dynamic clustering of histograms using Wasserstein metric In: Rizzi, A., Vichi, M. (eds.) COMPSTAT 2006. Physica-Verlag, Berlin, 869-876. Irpino, A.,Verde, R. (2006): A new Wasserstein based distance for the hierarchical clustering of histogram symbolic data In: Batanjeli, V., Bock, H.H., Ferligoj, A., Ziberna, A. (eds.) Data Science and Classification, IFCS 2006. Springer, Berlin, 185-192.

Examples

Run this code
# NOT RUN {
##---- initialize two distributionH objects mydist1 and mydist2
 mydist1=distributionH(c(1,2,3),c(0, 0.4, 1))
 mydist2=distributionH(c(7,8,10,15),c(0, 0.2, 0.7, 1))
 ## register the two distributions
 regDist=register(mydist1,mydist2)
 
## OUTPUT:
## regDist$[[1]]
## An object of class "distributionH"
## Slot "x": [1] 1.0 1.5 2.0 2.5 3.0
## Slot "p": [1] 0.0 0.2 0.4 0.7 1.0
## ...
## regDist$[[2]] 
## An object of class "distributionH"
## Slot "x": [1] 7.0 8.0 8.8 10.0 15.0
## Slot "p": [1] 0.0 0.2 0.4  0.7  1.0
## ...
# }

Run the code above in your browser using DataLab