Rank selection for nmfae.signed (paired rank, concise diagnostics)
Source:R/nmfae.signed.R
nmf.rrr.signed.rank.RdFits nmf.rrr.signed with a paired decoder/encoder
rank (\(Q = R\)) across a range of ranks and reports
r.squared, the effective rank (of the latent encoding \(H\)),
and the element-wise CV error sigma.ecv, with the same concise
plot as nmfkc.rank. For a full \((Q, R)\) grid use
nmf.rrr.signed.ecv.
Usage
nmf.rrr.signed.rank(
Y1,
Y2 = Y1,
rank1 = 1:5,
detail = c("full", "fast"),
plot = TRUE,
...
)Arguments
- Y1
Endogenous matrix (\(P_1 \times N\)); may be signed.
- Y2
Exogenous matrix; defaults to
Y1.- rank1
Integer vector of (paired) ranks to evaluate (both bases use the same value). Legacy
Qaccepted via....- detail
"full"(default) also runs element-wise CV (sigma.ecv);"fast"skips it (plots r.squared and eff.rank only, and recommends the R-squared elbow).- plot
Logical; draw the diagnostics plot (default
TRUE).- ...
Passed on to
nmf.rrr.signedandnmf.rrr.signed.ecv. Also acceptscoresto evaluate the rank sweep (and the element-wise CV) in parallel; defaultgetOption("mc.cores", 1L). Each rank is an independent self-seeded fit and results are gathered in order, so the output is identical for anycores. Rank aliases accepted here for backward compatibility:Qforrank1.
Value
A list with rank.best and criteria
(rank, effective.rank, effective.rank.ratio,
r.squared, sigma.ecv).
References
Roy, O., & Vetterli, M. (2007). The effective rank: A measure of
effective dimensionality. Proc. EUSIPCO, 606–610.
(effective.rank)
Wold, S. (1978). Cross-validatory estimation of the number of
components in factor and principal components models.
Technometrics, 20(4), 397–405. (sigma.ecv)