cvR_pred | R Documentation |
Examines the prediction performance of R-separable model for
the degree of separability R=1,...,maxR via a cross-validated scheme:
for every surface in the current hold-out sample, part of the surface
(a fixed number of rows and columns given by perc
) is predicted based
on the remainder, and relative prediction error is calculated. Two random
splits of every observation are predicted.
cvR_pred(X, Folds = 10, maxR = 7, maxiter = 10, perc = NULL)
X |
data set, array of size |
Folds |
number of folds |
maxR |
maximum degree-of-separability considered |
maxiter |
maximum number of iterations for scd_est() |
perc |
number in (0,1) giving the portion of rows and columns held out for prediction, defaults to 1/2, in that case 3/4 of every held-out surface is predicted based on the remaining 1/4 |
vector of prediction performances for different values of R
X <- array(runif(20*3*4),c(20,3,4)) cvscores <- cvR_pred(X,10,5) min(localMaxima(-cvscores)) # best R is chosen as the smallest local minimum # of the CV objective
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.