The main features of this package are: implementation of theSVM-Maj majorization algorithm for SVMs, handling ofnonlinearity through splines and kernels, the ability to handle severalerror functions (among other the classic hinge, quadratic hinge andHuber hinge error).
The main functions of the package aresvmmaj, whichestimates the SVM, andsvmmajcrossval, which performs agrid search ofk-fold cross validations usingSVM-Maj to find the combination of input values, (suchaslambda anddegree in the case of apolynomial kernel) giving the best prediction performance.
The former function requires then x k attribute matrixX and then x 1 vectory withclass labels. Apart from the data objects, other parameter input valuescan be given as input to tune the model: -lambda, -hinge, -weights.obs, -scale,and - parameters for nonlinearities and settings of the algorithmitself.
For example,
svmmaj(X, y, lambda = 2, hinge = "quadratic", scale = "interval")runs the SVM model withlambda = 2, using a quadratichinge and for each attribute, the values are scaled to the interval[0,1]. The functionsvmmajcrossval uses the same parameterinput values and additionally the parameters to be used as grid pointsof thek-fold cross validation. These parameters should begiven in the list objectsearch.grid, e.g.,
svmmajcrossval(X, y, search.grid = list(lambda = c(1, 2, 4)))