cv.enetLTS {enetLTS}R Documentation

Cross-validation for the enetLTS object

Description

Does k-fold cross-validation for enetLTS, produces a plot, and returns optimal values for alpha and lambda. Combine the cross-validation functions internally used in the algorithm enetLTS.

Usage

cv.enetLTS(index=NULL,family,xx,yy,alphas,lambdas,nfold,repl,ncores,plot=TRUE)

Arguments

index

A user supplied index. The default is NULL in the algorithm enetLTS.

family

a description of the error distribution and link function to be used in the model. "gaussian" and "binomial" and "multinomial" options are available.

xx

matrix xx as in enetLTS.

yy

response yy as in enetLTS.

alphas

a user supplied alpha sequence for the elastic net penalty, which is the mixing proportion of the ridge and lasso penalties and takes value in [0,1]. Here \alpha=1 is the lasso penalty, and \alpha=0 the ridge penalty.

lambdas

a user supplied lambda sequence for the strength of the elastic net penalty.

nfold

a user supplied numeric value for fold number of k-fold cross-validation which used in varied functions of the algorithm. The default is 5-fold cross-validation.

repl

a user supplied posiitive number for more stable results, repeat the k-fold CV repl times and take the average of the corresponding evaluation measure. The default is 5.

ncores

a positive integer giving the number of processor cores to be used for parallel computing. The default is 4.

plot

a logical indicating if produces a plot for k-fold cross-validation based on alpha and lambda combinations. The default is TRUE.

Value

produces a plot, and returns optimal values for alpha and lambda

Note

This is an internal function. But, it is also available for direct usage to obtain optimal values of alpha and lambda for user supplied index set.

Author(s)

Fatma Sevinc KURNAZ, Irene HOFFMANN, Peter FILZMOSER
Maintainer: Fatma Sevinc KURNAZ <fskurnaz@gmail.com>;<fskurnaz@yildiz.edu.tr>


[Package enetLTS version 1.1.0 Index]