| Title: | Matrix Partial EM for Incomplete Matrix-Normal Data |
|---|---|
| Description: | Fits single-component and finite-mixture Kronecker-structured matrix-normal models and imputes incomplete matrix-variate data using matrix partial expectation-maximization. General MPEM handles arbitrary missingness, while Rect-MPEM exploits rectangular structural missingness. The methods are described in Lu, Andrews and Browne (2026) "An Efficient EM Algorithm for Both Element-Wise and Structural Missingness in Matrix-Variate Normal Mixture Models" <doi:10.48550/arXiv.2609.00616>. |
| Authors: | Hanzhang Lu [aut, cre, cph], Jeffrey L. Andrews [aut, ths], Ryan P. Browne [aut] |
| Maintainer: | Hanzhang Lu <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-09-19 11:30:38 UTC |
| Source: | https://github.com/lhzmix/mpem |
mpem() fits either one matrix-normal distribution or a finite mixture of
matrix-normal distributions. It estimates separable row and column
covariance matrices and imputes missing entries. General MPEM handles
arbitrary missingness, while Rect-MPEM exploits a rectangular missing block
within each matrix observation. Set G > 1 to estimate component
membership and component-specific parameters.
mpem( X, row_dim = NULL, col_dim = NULL, method = c("auto", "arbitrary", "structural"), sweeps = 1L, tol = 1e-04, max_iter = 1000L, init = NULL, G = 1L, mixture_init = c("kmeans", "random"), seed = 1L, nstart = 10L, warm_start = 1, ridge = 1e-08, verbose = interactive() )mpem( X, row_dim = NULL, col_dim = NULL, method = c("auto", "arbitrary", "structural"), sweeps = 1L, tol = 1e-04, max_iter = 1000L, init = NULL, G = 1L, mixture_init = c("kmeans", "random"), seed = 1L, nstart = 10L, warm_start = 1, ridge = 1e-08, verbose = interactive() )
X |
A |
row_dim |
Number of rows in each matrix observation. Inferred from an array and required for a matrix. |
col_dim |
Number of columns in each matrix observation. Inferred from an array and required for a matrix. |
method |
Missing-data method. |
sweeps |
Number of coordinate sweeps used to update conditional covariance matrices. |
tol |
Relative convergence tolerance. |
max_iter |
Maximum number of MPEM iterations. |
init |
Optional list containing |
G |
Number of matrix-normal mixture components. The default |
mixture_init |
Initialization used when |
seed |
Integer seed used only for mixture initialization. |
nstart |
Number of random starts used by mixture k-means initialization. |
warm_start |
Weight in |
ridge |
Nonnegative numerical ridge used to stabilize mixture covariance estimates. |
verbose |
If |
When G = 1, an object of class mpem_fit containing the imputed
data, fitted parameters, and convergence diagnostics. When G > 1, an
object of class mpem_mixture_fit that additionally contains mixing
proportions, posterior responsibilities, hard clusters, observed
log-likelihood, and BIC.
set.seed(1) X <- array(rnorm(3 * 2 * 10), dim = c(3, 2, 10)) X[cbind(c(1, 2), c(1, 2), c(1, 2))] <- NA fit <- mpem(X, method = "auto", max_iter = 3) anyNA(fit$imputed) fit$method X[, , 6:10] <- X[, , 6:10] + 3 mixture_fit <- mpem(X, G = 2, max_iter = 10) table(mixture_fit$cluster)set.seed(1) X <- array(rnorm(3 * 2 * 10), dim = c(3, 2, 10)) X[cbind(c(1, 2), c(1, 2), c(1, 2))] <- NA fit <- mpem(X, method = "auto", max_iter = 3) anyNA(fit$imputed) fit$method X[, , 6:10] <- X[, , 6:10] + 3 mixture_fit <- mpem(X, G = 2, max_iter = 10) table(mixture_fit$cluster)