cvR: Cross-validation for Degree-of-Separability Selection

View source: R/cvR.R

cvRR Documentation

Cross-validation for Degree-of-Separability Selection

Description

Calculates the objective value of the cross-validation criterion to select the degree of separability R=1,...,maxR best fitting the data.

Usage

cvR(X, Folds = 10, maxR = 7, maxiter = 10)

Arguments

X

data set, array of size N x K1 x K2

Folds

number of folds

maxR

maximum degree-of-separability considered (defaults to log-sample size)

maxiter

maximum number of iterations for scd_est()

Value

CV objective

Examples

X <- array(runif(20*3*4),c(20,3,4))
cvscores <- cvR(X,10,5)
min(localMaxima(-cvscores)) # best R is chosen as the smallest local minimum
                            # of the CV objective

TMasak/surfcov documentation built on April 25, 2022, 12:15 a.m.