Learn R Programming

BayesianDisaggregation (version 0.1.2)

posterior_multiplicative: Multiplicative posterior (Hadamard product + renormalization)

Description

Computes \(W \propto P \odot LT\) (producto elemento a elemento) y renormaliza cada fila a la simplex. Útil cuando prior y likelihood deben reforzarse mutuamente.

Usage

posterior_multiplicative(P, LT)

Value

Posterior matrix \(W\) (\(T \times K\)), filas suman 1.

Arguments

P

Prior matrix (\(T \times K\)); filas no negativas.

LT

Likelihood matrix (\(T \times K\)); filas no negativas.

See Also

posterior_weighted, posterior_dirichlet, posterior_adaptive

Examples

Run this code
T <- 4; K <- 4
P  <- matrix(runif(T*K), T); P  <- P / rowSums(P)
LT <- matrix(runif(T*K), T); LT <- LT / rowSums(LT)
W <- posterior_multiplicative(P, LT)

Run the code above in your browser using DataLab