cv.enetLTS

0th

Percentile

Cross-validation for the enetLTS object

Does k-fold cross-validation for enetLTS, produces a plot, and returns optimal values for alpha and lambda.

Keywords
models, regression
Usage
cv.enetLTS(index=NULL,xx,yy,family,h,alphas,lambdas,nfold,repl,ncores,plot=TRUE)
Arguments
index

A user supplied index. The default is NULL.

xx

matrix xx as in enetLTS.

yy

response yy as in enetLTS.

family

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

h

a user supplied numeric value giving how many observations will be used.

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.

Aliases
  • cv.enetLTS
Documentation reproduced from package enetLTS, version 0.1.0, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.