| nmf.gmm.twostage | R Documentation |
This function is experimental and still under development. The interface may change in future versions: argument names, defaults and the contents of the returned object are not yet stable. Code written against it today may need adjusting after an update. The rest of the package does not carry this caveat.
nmf.gmm.twostage runs the two-stage route that
nmf.gmm is designed to improve on, as a matched baseline:
(1) estimate least-squares scores on the initial basis, (2) regress the
scores on the covariates blind to the class and keep the residuals,
(3) reconstitute the residuals in observation space, shift them to
non-negativity, and (4) refit an intercept-only nmf.gmm from the
same basis initialization. Both routes start from the same basis and
use the same mixture family and settings. They differ in the order of
adjustment and clustering and, unless fixX = TRUE, in the basis each
refits to its own data: the two-stage route refits it to the
reconstituted, shifted residuals. When the covariate is associated with the
class, the class-blind regression of stage (2) displaces the class means
(the oracle proposition of Satoh 2026); when the covariate is
(near-)mean-independent of the class, that displacement vanishes in the
population, so both routes target the same class means, although the
fitted partitions need not coincide in a finite sample.
nmf.gmm.twostage(Y, A = NULL, rank, K = 1, ...)
Y |
Data matrix |
A |
Covariate matrix |
rank |
Integer rank |
K |
Integer number of mixture components. |
... |
Additional arguments as in |
An object of class c("nmf.gmm.twostage", "nmf.gmm"): the
stage-2 fit (all nmf.gmm fields and S3 methods apply),
plus a twostage list with the non-negativity shift, the
covariate matrix A that was removed, and the shared basis
initialization X0.
nmf.gmm (the joint route this baselines).
set.seed(1)
Y <- matrix(abs(rnorm(12 * 40)) + 1, 12, 40)
A <- rbind(1, rnorm(40))
ts <- nmf.gmm.twostage(Y, A, rank = 2, K = 2, nstart = 2, maxit = 100)
table(ts$cluster)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.