Skip to contents

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

nmfae.rank(
  Y1,
  Y2 = Y1,
  rank = 1:5,
  detail = c("full", "fast"),
  plot = TRUE,
  ...
)

Arguments

Y1

Endogenous matrix (\(P_1 \times N\)).

Y2

Exogenous matrix; defaults to Y1 (autoencoder).

rank

Integer vector of (paired) ranks to evaluate.

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

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)