nmf.rrr.rank: Rank selection for nmfae (paired rank, concise diagnostics)

View source: R/nmfae.R

nmf.rrr.rankR Documentation

Rank selection for nmfae (paired rank, concise diagnostics)

Description

Fits nmfae 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 nmfae.ecv with rank.encoder and its heatmap.

Usage

nmf.rrr.rank(
  Y1,
  Y2 = Y1,
  rank1 = 1:5,
  detail = c("full", "fast"),
  plot = TRUE,
  ...,
  rank = NULL
)

Arguments

Y1

Endogenous matrix (P_1 \times N).

Y2

Exogenous matrix; defaults to Y1 (autoencoder).

rank1

Integer vector of (paired) ranks to evaluate (both bases use the same value). Legacy Q accepted 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 nmfae and nmfae.ecv (e.g.\ maxit, nfolds, seed).

rank

Deprecated alias of rank1.

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)

See Also

nmfae, nmfae.ecv, nmfkc.rank


nmfkc documentation built on July 14, 2026, 1:07 a.m.