cvsmac: A cross validation function for smac.

Description Usage Arguments Value Author(s) References See Also Examples

Description

This function is used to perform cross validation based on a training data set to select the best tuning parameter.

Usage

1
cvsmac(x,y,kfold=5,lambda=NULL,nlambda=100,lambda.min=NULL,seed=0,weight=NULL,...)

Arguments

x

The usage of this argument is the same as that in the "smac" function.

y

The usage of this argument is the same as that in the "smac" function.

kfold

The number of subsamples for cross validation. This number should be less than the sample size of the class with the fewest obervations. A warning will be given if kfold is too large. Default is 5.

lambda

The usage of this argument is the same as that in the "smac" function.

nlambda

The usage of this argument is the same as that in the "smac" function.

lambda.min

The usage of this argument is the same as that in the "smac" function.

seed

The seed for generating the random split of the training data set. Default is 0.

weight

The usage of this argument is the same as that in the "smac" function.

...

Other arguments used by function "smac" that are not specified.

Value

lambda

The sequence of tuning parameters used in cross validation. Notice that the lambdas will be in a decreasing order.

beta0

The estimated intercepts with respect to each tuning parameter lambda.

beta

The estimated parameters of the predictors with respect to each tuning parameter lambda.

error

The total number of misclassifications with respect to each tuning parameter lambda. If weight is specified, each miscalssification is multiplied by its corresponding weight.

best.lambda

The sequence of lambda values that have the smallest cross validation error.

best.beta0

The intercepts that correspond to best.lambda.

best.beta

The parameters that correspond to best.lambda.

model

The fitted model with respect to each tuning parameter, using the entire training data set.

min.error

The minimum error in cross validation.

Author(s)

Chong Zhang, Guo Xian Yau and Yufeng Liu

References

C. Zhang and Y. Liu (2014). Multicategory Angle-based Large-margin Classification. Biometrika, 101(3), 625-640.

See Also

smac,predict.cvsmac

Examples

1
2
data(ex1.data)
cvsmac(ex1.data$ex1.x,ex1.data$ex1.y,loss="p",nlambda=30)

smac documentation built on May 1, 2019, 9:11 p.m.

Related to cvsmac in smac...