Element-wise Cross-Validation for Signed-Bottleneck NMF-AE
Source:R/nmfae.signed.R
nmf.rrr.signed.ecv.RdElement-wise k-fold cross-validation for nmf.rrr.signed to
select the decoder / encoder ranks \((Q, R)\). Mirrors
nmf.rrr.ecv but uses the weighted Signed-Bottleneck NMF-AE fit
path (Y1.weights): test-fold elements are zero-weighted during
fitting, and held-out MSE is computed on those elements.
Arguments
- Y1
Output matrix (P1 x N).
- Y2
Input matrix (P2 x N). Default
Y1.- rank1
Integer vector of candidate response-basis ranks. Default
1:2.- rank2
Integer vector of candidate covariate-basis ranks, or
NULL(default: pair rank2 = rank1, diagonal grid).- ...
Additional arguments:
nfolds/divNumber of folds. Default 5.
seedRNG seed for fold assignment. Default 123.
coresEvaluate the \((Q,R)\)-pair \(\times\) fold grid in parallel. Default
getOption("mc.cores", 1L)(PSOCK on Windows, forking elsewhere). Each task is an independent self-seeded fit and results are aggregated in order, so the returned object is identical for anycores.nstartNumber of random restarts per fit. Default 1. Signed models have more local minima (the bottleneck can carry both signs), so
nstart >= 10is recommended for reproducible rank selection.- Other args
epsilon,maxit,warm.start, etc.\ are passed tonmf.rrr.signed.
Rank aliases accepted here for backward compatibility:
Qforrank1,Rforrank2.
Value
An object of class c("nmfae.signed.ecv", "nmfae.ecv") with
objfunc (MSE per pair), sigma (RMSE), objfunc.fold
(per-fold MSE), folds, QR, paired.
References
Ding, C. H. Q., Li, T., & Jordan, M. I. (2010). Convex and semi-nonnegative matrix factorizations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(1), 45–55.