Description Usage Arguments Value Author(s) References See Also Examples
Optimizes the SVM objective for a multi-way dataset and a vector of class labels, under the assumption that the coefficient array is of low-rank.
1 |
xmul |
An array of dimensions N x P x M. The initial dimension (N) gives the cases to be classified. |
y |
A vector of length N giving the class label ('-1' or '1') for each case. |
R |
Number of intitializations. |
rank |
Assumed rank of the P x M coefficient matrix. |
C |
Penalty parameter for the SVM objective. |
beta |
P x M matrix of coefficients |
int |
Intercept |
obj |
Value of the SVM objective |
If r=1:
w |
Vector of length P, giving weights in the second dimension |
v |
Vector of length M, giving weights in the third dimension |
Eric F. Lock, Tianmeng Lyu, and Lynn E. Eberly
Karatzoglou, A., Meyer, D., & Hornik, K. (2006). Support Vector Machines in R. Journal of Statistical Software, 15(9):1-28.
1 2 3 4 5 | data(IFNB_Data) ##Load gene expression time course data (?IFNB_Data for more info)
results.mw <- mul.svm(DataArray,y=Class,R=20, rank=1) #estimate rank 1 model
##Compute projection onto the classification direction for each individual:
SVM_scores <- c()
for(i in 1:length(Class)) SVM_scores[i] = sum(DataArray[i,,]*results.mw$beta)+results.mw$int
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.