| nmf.rrr.cv | R Documentation |
nmfae.cv performs k-fold cross-validation by splitting columns (samples)
of Y_1 and Y_2 into div folds. For each fold, the model
Y_1 \approx X_1 \Theta X_2 Y_2 is fitted on the training samples and
predictive performance is evaluated on the held-out samples.
When Y2 is a kernel matrix created by nmfkc.kernel
(detected via attributes), the symmetric kernel splitting convention is used:
Y2[train, train] for training and Y2[train, test] for prediction.
nmf.rrr.cv(
Y1,
Y2 = Y1,
rank1 = 2,
rank2 = NULL,
...,
rank = NULL,
rank.encoder = NULL
)
Y1 |
Output matrix |
Y2 |
Input matrix |
rank1 |
Integer. Rank of the response basis. Default is 2. |
rank2 |
Integer. Rank of the covariate basis. Default ( |
... |
Additional arguments passed to |
rank, rank.encoder |
Deprecated aliases of |
A list with components:
objfunc |
Mean squared error per valid element over all folds. |
sigma |
Residual standard error (RMSE), same scale as |
objfunc.block |
Per-fold squared error totals. |
block |
Integer vector of fold assignments (1, ..., |
This function is experimental. The interface may change in future versions; details are to be described in an upcoming paper.
nmfae, nmfae.ecv, nmfae.kernel.beta.cv,
nmfkc.cv
Y <- t(iris[1:30, 1:4])
res <- nmf.rrr.cv(Y, rank1 = 2, rank2 = 2, nfolds = 5, maxit = 500)
res$sigma
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.