Select regularization parameters via cross-validation

Share:

Description

Select regularization parameters via K-fold cross-validation

Usage

1
2
3
cv.MNS(dat, l1range, alpharange, 
    K = 5, parallel = FALSE, 
    cores = NULL, verbose = FALSE)

Arguments

dat

List where each entry corresponds to the time series observations for each subject

l1range

Vector of candidate regularization parameters. See details below

alpharange

Vector of candidate weighting parameters. See details below.

K

Number of cross-validation folds

parallel

Indicate whether model fit should be done in parallel. Default is FALSE

cores

If fit in parallel, indicate how many units/cores should be used

verbose

Print progress. Only available for non-parallel implementation

Details

Select regularization parameters via cross-validation. In the interest of simplicity we re-parameterize penalty as an elastic net penalty:

λ * α || β||_1 + λ * (1-α) || σ||_1

Thus λ is the regularization parameter (specified by the l1range argument) and α is the weighting parameter (specified by the alpharange argument).

Value

l1

selected regularization parameter

alpha

selected weighting parameter

CV

grid of cross-validation error for each pair of regularization parameters

Author(s)

Ricardo Pio Monti

References

Arlot, S., and Alain C. "A survey of cross-validation procedures for model selection." Statistics surveys 4 (2010): 40-79.

Monti, R., Anagnostopolus, C., Montana, G. "Inferring brain connectivity networks from functional MRI data via mixed neighbourhood selection", arXiv, 2015

See Also

MNS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(1)
Dat = gen.Network(p = 10, Nsub = 5, 
 sparsity = .2, REsize=10, REprob=.5, 
 REnoise = 1, Nobs=20)
## Not run: 
CVs = cv.MNS(dat = Dat, l1range = seq(.1, .5, length.out=10),
 alpharange = seq(.2, .8, length.out = 5), 
 parallel = FALSE, verbose = TRUE)

## End(Not run)