logProbabilityFeatureAllocation {aibd}R Documentation

Evaluation of a Log Probabilty Mass Function of a Feature Allocation Distribution

Description

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.

Usage

logProbabilityFeatureAllocation(
  featureAllocation,
  distribution,
  implementation = "scala"
)

Arguments

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 aibd or ibp.

implementation

The default of "scala" should be used. The "R" option is not a supported implementation.

Value

The log probability of the feature allocation under the supplied distribution.

Examples

 # 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)



[Package aibd version 0.1.9 Index]