estim.regul: Estimate the parameters of regularization

estim.regulR Documentation

Estimate the parameters of regularization

Description

Calulate the leave-one-out criterion on a 2D-grid to determine optimal values for the parameters of regularization.

Usage

estim.regul(X, Y, grid1 = NULL, grid2 = NULL, plt = TRUE)

Arguments

X

numeric matrix (n * p), containing the X coordinates.

Y

numeric matrix (n * p), containing the X coordinates.

grid1

vector defining the values of lambda1 to be tested. If NULL, the vector is defined as seq(0.001, 1, length = 5)

grid2

vector defining the values of lambda2 to be tested. If NULL, the vector is defined as seq(0.001, 1, length = 5)

plt

logical argument indicating whether an image should be plotted by calling the img.estim.regul() function.

Value

A 3-vector containing the 2 values of the parameters of regularization on which the leave-one-out criterion reached its maximum; and the maximal value reached on the grid.

Author(s)

Sébastien Déjean, Ignacio González

See Also

loo

Examples


#data(nutrimouse)
#X=as.matrix(nutrimouse$gene)
#Y=as.matrix(nutrimouse$lipid)
#res.regul = estim.regul(X,Y,c(0.01,0.5),c(0.1,0.2,0.3)) 

CCA documentation built on Sept. 8, 2023, 5:19 p.m.