Description Author(s) References See Also Examples
This package implements models described in the paper Dahl, D. B., Day, R., and Tsai, J. (2017), Random Partition Distribution Indexed by Pairwise Information, Journal of the American Statistical Association, 112, 721-732. The Ewens, Ewens-Pitman, Ewens attraction, Ewens-Pitman attraction, and ddCRP distributions are available for prior simulation. We hope in the future to add posterior simulation with a user-supplied likelihood. Supporting functions for partition estimation and plotting are also planned.
David B. Dahl dahl@stat.byu.edu
ewens.pitman.attraction
,
sample.partitions
1 2 3 4 5 6 7 8 9 10 11 12 13 | data <- iris[,-ncol(iris)]
truth <- as.integer(iris[,ncol(iris)])
distance <- as.dist(as.matrix(dist(scale(data))+0.001))
decay <- decay.exponential(temperature(9.0, fixed=TRUE), distance)
permutation <- permutation(n.items=nrow(data), fixed = FALSE)
attraction <- attraction(permutation, decay)
mass <- mass(1.0, fixed = TRUE)
discount <- discount(0.2, fixed = TRUE)
distribution <- ewens.pitman.attraction(mass, discount, attraction)
raw <- sample.partitions(distribution, 500, parallel=FALSE)
samples <- process.samples(raw)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.