alpha-SVM {CompositionalML} | R Documentation |
\alpha
-SVM
Description
\alpha
-SVM.
Usage
alfa.svm(xnew, y, x, a = seq(-1, 1, by = 0.1), cost = seq(0.2, 2, by = 0.2), gamma = NULL)
Arguments
xnew |
A matrix with the new compositional data whose group is to be predicted.
Zeros are allowed, but you must be careful to choose strictly positive vcalues of |
y |
The response variable, it can either be a factor (for classification) or a numeric vector (for regression). Depending on the nature of the response variable, the function will proceed with the necessary task. |
x |
A matrix with the compositional data. |
a |
A vector with a grid of values of the power transformation, it has to be between -1 and 1. If zero values are present it has to be greater than 0. If a=0, the isometric log-ratio transformation is applied. |
cost |
A grid of values for the cost of constraints violation. The cost is the "C"-constant of the regularization term in the Lagrange formulation. |
gamma |
A grid of values for the |
Details
For each value of \alpha
, the compositional data are transformed and then
the SVM is applied for one or more combinations of the cost and \gamma
parameters.
Value
A list including:
mod |
A list with the results of the SVM model for each value of |
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
References
Chang Chih-Chung and Lin Chih-Jen: LIBSVM: a library for Support Vector Machines https://www.csie.ntu.edu.tw/~cjlin/libsvm/
Tsagris M.T., Preston S. and Wood A.T.A. (2011). A data-based power transformation for compositional data. In Proceedings of the 4th Compositional Data Analysis Workshop, Girona, Spain. https://arxiv.org/pdf/1106.1451.pdf
See Also
Examples
x <- as.matrix(iris[, 1:4])
x <- x/ rowSums(x)
y <- iris[, 5]
mod <- alfa.svm(x, y, x, a = c(0, 0.5, 1), cost = c(0.2, 0.4), gamma = c(0.1, 0.2) )
mod