Description Usage Arguments Details Author(s) References See Also Examples
ksmm is used to train a kernel support matrix machine. It can be used to carry out classification.
1 2 |
x |
a input data matrix |
y |
a response vector with one label for each row / component of X. It must be 1 or -1 |
K |
the calculated kernel matrix. If you don't input anything, it works automatically. |
x_dim |
the size of input matrix X |
cost |
cost of constraints violation |
kernel |
type of the kernel used in training.
|
sigma |
kernel width for the Radial Basis kernel function "rbf" |
maxit |
a maximum number of iteration for SMO algorithm |
epsilon |
a minimum value for optimization |
init_alpha |
initialization of alpha |
nCores |
the number of cores to use for parallel computing. |
... |
currently not used. |
This function is built by KSMM paper. Detailed theory is included in the KSMM paper.
Kyuri Park (based on Matlab code by Yunfei Ye)
Ye, Y. (2019). A nonlinear kernel support matrix machine. International Journal of Machine Learning and Cybernetics.
1 2 3 4 5 6 7 8 9 10 | require(ksmm)
data(nottingham)
X = as.matrix(nottingham[,-1])
y = ifelse(nottingham[,1] == 1, 1, -1)
train_x = X[1,]
train_y = y[1]
ksmm_fit = ksmm(train_x, train_y, c(200,200), 1, 1, 'rbf', 100, 1, 5e-2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.