predict.smac: A function that provides class label prediction and class conditional probability estimation for objects returned by the "smac" function.
Description
This function provides prediction on a test data set using the obtained classification model from a call of the smac function.
Usage
## S3 method for class 'smac':
predict(object,new.x=NULL,lambda=NULL,...)
Arguments
Value
new.xThe predictor matrix used for prediction.lambdaThe lambda values used for prediction.fitted.beta0The predicted intercept for each lambda value.fitted.betaA list of predicted matrices of parameters for each lambda value. The matrices in the list correspond to the lambda values in the returned lambda object in orders. Each row of a matrix corresponds to a predictor, and the name of the predictor is recorded as the row name. Note that a predictor does not affect the class label if and only if all elements in that corresponding row are 0.pred.yA list of predicted labels for each observation in new.x. A prediction is made for each lambda value in the returned lambda object.pred.probA list of data.frames containing predicted class conditional probabilities. Each data.frame object corresponds to a value in the 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.
References
C. Zhang and Y. Liu (2014). Multicategory Angle-based Large-margin Classification. Biometrika, 101(3), 625-640.