cv.lori: selection of the regularization parameters (lambda1 and...

Description Usage Arguments Value Examples

Description

selection of the regularization parameters (lambda1 and lambda2) of the lori function by cross-validation

Usage

1
2
3
cv.lori(Y, cov = NULL, intercept = F, reff = T, ceff = T,
  rank.max = 10, N = 5, len = 20, prob = 0.2, algo = c("alt",
  "mcgd"), thresh = 1e-06, maxit = 100, trace.it = F, parallel = F)

Arguments

Y

[matrix, data.frame] abundance table (nxp)

cov

[matrix, data.frame] design matris (npxq)

intercept

[boolean] whether an intercept should be fitted, default value is FALSE

reff

[boolean] whether row effects should be fitted, default value is TRUE

ceff

[boolean] whether column effects should be fitted, default value is TRUE

rank.max

[integer] maximum rank of interaction matrix, default is 2

N

[integer] number of cross-validation folds

len

[integer] the size of the grid

prob

[numeric in (0,1)] the proportion of entries to remove for cross-validation

algo

type of algorithm to use, either one of "mcgd" (mixed coordinate gradient descent, adapted to large dimensions) or "alt" (alternating minimization, adapted to small dimensions)

thresh

[positive number] convergence threshold, default is 1e-5

maxit

[integer] maximum number of iterations, default is 100

trace.it

[boolean] whether information about convergence should be printed

parallel

[boolean] whether the N-fold cross-validation should be parallelized, default value is TRUE

Value

A list with the following elements

lambda1

regularization parameter estimated by cross-validation for nuclear norm penalty (interaction matrix)

lambda2

regularization parameter estimated by cross-validation for l1 norm penalty (main effects)

errors

a table containing the prediction errors for all pairs of parameters

Examples

1
2
3
X <- matrix(rnorm(20), 10)
Y <- matrix(rpois(10, 1:10), 5)
res <- cv.lori(Y, X, N=2, len=2)

genevievelrobin/lori documentation built on May 17, 2019, 11:14 p.m.