Learn R Programming

expperm (version 1.6)

sink: A variational approximation of an expected permutation matrix

Description

Computes an approximate expected permutation matrix and marginal likelihood from a matrix of assignment likelihoods. The approximation minimizes a constrained KL divergence from the likelihood, and is computed via the repeated renormalization of the input's rows and columns.

Usage

sink(A, maxit = 99, return.permanent.bound = FALSE)

Arguments

A

A matrix of assignment likelihoods.

maxit

An integer specifying the maximum number of steps used in the optimization.

return.permanent.bound

A logical value indicating whether the function should also return an upper bound on the permanent of A, which is then added to the output as an attribute.

Value

E(P), the expected permutation matrix corresponding to A.

Examples

Run this code
# NOT RUN {
data(A)
sink(A)
# }

Run the code above in your browser using DataLab