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

Description Usage Arguments Value

View source: R/cv.mimi.R

Description

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

Usage

1
2
3
cv.mimi(y, model = c("low-rank", "covariates"), var.type, x = NULL,
  N = 5, thresh = 1e-05, maxit = 100, max.rank = NULL,
  trace.it = F, parallel = T, len = 15)

Arguments

y

[matrix, data.frame] incomplete and mixed data frame (nxp)

model

either one of "groups", "covariates" or "low-rank", indicating which model should be fitted

var.type

vector of length p indicating types of y columns (gaussian, binomial, poisson)

x

[matrix, data.frame] covariate matrix (npxq)

N

[integer] number of cross-validation folds

thresh

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

maxit

[integer] maximum number of iterations, default is 100

max.rank

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

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

len

[integer] the size of the grid

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


genevievelrobin/mimi documentation built on May 7, 2019, 10:57 a.m.