Learn R Programming

HistDAWass (version 1.0.4)

is.registeredMH: Method is.registeredMH

Description

Checks if a MatH contains histograms described by the same number of bins and the same cdf.

Usage

is.registeredMH(object)

# S4 method for MatH is.registeredMH(object)

Arguments

object

A MatH object

Value

a logical value TRUE if the distributions share the same cdf, FALSE otherwise.

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 three distributionH objects mydist1 and mydist2
 mydist1=new("distributionH",c(1,2,3),c(0, 0.4, 1))
 mydist2=new("distributionH",c(7,8,10,15),c(0, 0.2, 0.7, 1))
 mydist3=new("distributionH",c(9,11,20),c(0, 0.8, 1))
 ## create a MatH object
 MyMAT=new("MatH",nrows=1,ncols=3,ListOfDist=c(mydist1,mydist2,mydist3), 1,3)
 is.registeredMH(MyMAT)
 ## [1] FALSE #the distributions do not share the same cdf 
 ## Hint: check with str(MyMAT)
 
 ## register the two distributions
 MATregistered=registerMH(MyMAT)
 is.registeredMH(MATregistered)
 ## TRUE #the distributions share the same cdf
 ## Hint: check with str(MATregistered)

# }

Run the code above in your browser using DataLab