Learn R Programming

smac (version 1.0)

smac: Classification function that provides solution path to Multicategory Angle-based large-margin Classifiers (MAC) with L1 penalty

Description

A classifier that works under the structure of MAC (Zhang and Liu, 2014) with linear learning and the L1 penalty for variable selection.

Usage

smac(x,y,loss=c("logistic", "psvm", "boost"),weight=NULL,nlambda = 100,
lambda.min=ifelse(nobs < np, 0.05, 1e-03),lambda = NULL,
standardize = TRUE, epsilon = 1e-05)

Arguments

Value

AllAll arguments that are used are recorded.kNumber of classes in the classification problems.x.nameThe column names of x.y.nameThe class names of y.lambdaThe lambda vector of all lambdas in the solution path.beta0A list of the intercepts of the classification function. Each vector in the list corresponds to the lambda in the solution path in order.betaA list of matrices containing the estimated parameters of the classification function. Each matrix in the list corresponds to the lambda value in the solution path in order. For one single matrix, the rows correspond to a specific predictor, whose name is recorded as the row name. Note that a predictor does not have a significant effect on the label if and only if all elements in its corresponding row are 0.lossThe loss function used.wayA numeric value specifying if the user provides the lambda values in the solution path (2), or not (1). This return is mainly used in the prediction function.callThe call of smac.

References

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

See Also

predict.smac

Examples

Run this code
data(ex1.data)
smac(ex1.data$ex1.x,ex1.data$ex1.y,loss="p",nlambda=30)

Run the code above in your browser using DataLab