Last chance! 50% off unlimited learning
Sale ends in
These functions specify the Ewens, Ewens-Pitman, Ewens attraction,
Ewens-Pitman attraction, and ddCRP distributions which would then be used in
the sample.partitions function.
ewens(mass, n.items, names = paste0("c", 1:n.items))# S3 method for shallot.distribution.ewens
print(x, ...)
ewens.pitman(mass, discount, n.items, names = paste0("c", 1:n.items))
# S3 method for shallot.distribution.ewensPitman
print(x, ...)
ewens.attraction(mass, attraction)
# S3 method for shallot.distribution.ewensAttraction
print(x, ...)
ewens.pitman.attraction(mass, discount, attraction)
# S3 method for shallot.distribution.ewensPitmanAttraction
print(x, ...)
ddcrp(mass, attraction)
# S3 method for shallot.distribution.ddcrp
print(x, ...)
An object of class shallot.mass
.
An integer containing the number of items to partition.
A character vector containing the names of the items. The default names are of the form “c1”, “c2”, etc.
An object of class shallot.distribution
.
Currently ignored.
An object of class shallot.discount
.
An object of class shallot.attraction
.
An object of class shallot.distribution
.
# NOT RUN {
pd1 <- ewens(mass(1),50)
decay <- decay.exponential(temperature(1.0),dist(scale(USArrests)))
attraction <- attraction(permutation(n.items=50,fixed=FALSE), decay)
pd2 <- ewens.pitman.attraction(mass(1), discount(0.05), attraction)
pd3 <- ddcrp(mass(1), attraction)
# }
Run the code above in your browser using DataLab