predict.cvsmac: A function that provides class label prediction and class...

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

Description

This function provides prediction on a test data set using the obtained classifier from a call of the cvsmac function.

Usage

1
2
## S3 method for class 'cvsmac'
predict(object,new.x = NULL,...)

Arguments

object

An object returned by a call from the function "cvsmac".

new.x

The predictor matrix used for prediction. If not specified, the training matrix x will be used.

...

Not used.

Value

new.x

The new testing matrix used for prediction.

best.lambda

The sequence of lambda values that have the smallest cross validation error in the training data set.

best.beta0

The beta0 values that correspond to the best.lambda sequence.

best.beta

The beta values that correspond to the best.lambda sequence.

best.pred.y

The predicted labels for new.x.

best.pred.prob

A list of data.frame containing predicted class conditional probabilities. Each data.frame corresponds to a value in the best.lambda object. Each row of the data.frames corresponds to an observation in new.x, and each column represents a class, with the column name as the class label.

call

The function call that returns this result.

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

cvsmac, predict.smac

Examples

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

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

Related to predict.cvsmac in smac...