Description Usage Arguments Value Examples
View source: R/logProbabilityFeatureAllocation.R
This function evaluates the log of the probability mass function of a feature allocation matrix or a list of feature allocations for the supplied distribution.
1 2 3 4 5 | logProbabilityFeatureAllocation(
featureAllocation,
distribution,
implementation = "scala"
)
|
featureAllocation |
An N-by-K binary feature allocation matrix, or a list of such matrices. |
distribution |
A feature allocation distribution as defined in the functions
|
implementation |
The default of "scala" should be used. The "R" option is not a supported implementation. |
The log probability of the feature allocation under the supplied distribution.
1 2 3 4 5 6 7 8 9 10 11 12 | # Regardless of size, the initial warmup can exceed CRAN's 5 seconds threshold
d1 <- ibp(1,4)
states <- c("California","Wisconsin","Nebraska","New York")
data <- USArrests[states,]
dist <- dist(scale(data))
d2 <- aibd(1, seq_along(states), 1.0, dist)
Z1 <- matrix(c(1,1,0,1), nrow=4)
logProbabilityFeatureAllocation(Z1, d1)
logProbabilityFeatureAllocation(Z1, d2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.