Matrix Partial EM for Incomplete Matrix-Normal Data

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" .


mpem

mpem fits matrix-normal models and imputes incomplete matrix-variate data. One public function handles both arbitrary and structural missingness:

  • general MPEM supports arbitrary missing entries;
  • Rect-MPEM exploits one rectangular missing block per observation.

Installation

remotes::install_github("LHZMix/MPEM")

Arbitrary missingness

library(mpem)

set.seed(1)
X <- array(rnorm(4 * 3 * 50), dim = c(4, 3, 50))
X_arbitrary <- X
X_arbitrary[cbind(c(1, 2, 4), c(1, 3, 2), c(1, 2, 3))] <- NA

fit <- mpem(X_arbitrary, method = "arbitrary")
X_complete <- fit$imputed
fit$parameters

Structural missingness

X_structural <- X
X_structural[1:2, 2:3, 1:5] <- NA

fit_structural <- mpem(X_structural, method = "structural")
X_complete_structural <- fit_structural$imputed

The default method = "auto" uses Rect-MPEM when every incomplete observation contains one rectangular missing block and uses general MPEM otherwise.

Mixture of matrix-normal distributions

Set G > 1 in mpem() to estimate component membership and component-specific matrix-normal parameters while using weighted MPEM to handle missing values.

set.seed(7)
X_mix <- array(rnorm(4 * 3 * 200), c(4, 3, 200))
X_mix[, , 101:200] <- X_mix[, , 101:200] + 3
X_mix[1:2, 2:3, seq(1, 200, by = 4)] <- NA

mixture_fit <- mpem(X_mix, G = 2, method = "auto")
table(mixture_fit$cluster)
mixture_fit$proportions
X_mix_complete <- mixture_fit$imputed

The returned posterior responsibility matrix can be used for soft classification. Component means, row covariances, column covariances, and scales are available in mixture_fit$parameters.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("mpem")

0.1.0 by Hanzhang Lu, 22 days ago


https://github.com/LHZMix/MPEM


Report a bug at https://github.com/LHZMix/MPEM/issues


Browse source code at https://github.com/cran/mpem


Authors: Hanzhang Lu [aut, cre, cph] , Jeffrey L. Andrews [aut, ths] , Ryan P. Browne [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports Rcpp, stats

Suggests testthat

Linking to Rcpp, RcppArmadillo


See at CRAN