Description Usage Arguments Value References Examples
View source: R/SimpleMKL.Classification.R
This function conducts Simple MKL for precomputed gramm matrices
1 | SimpleMKL.classification(k, outcome, penalty, tol = 10^(-4), max.iters = 1000)
|
k |
list of Gramm matrices |
outcome |
vector of binary outcome -1 and 1 |
penalty |
ppenalty of the smoothness of the resulting desicion rules |
tol |
change between to iterations is smaller than this, algorithms is considered to have converged |
max.iters |
maximum number of allowed iteratons |
gamma weight vector for the importnace of each kernel
alpha coeffiencents of the dual of MKL
time total amount of time to train model
max.iters Numvber of iterations to reach convergence criteria
A Rakotomamonjy, FR Bach, S Canu, Y Grandvalet. Journal of Machine Learning Research 9 (Nov), 2491-2521.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(kernlab)
library(caret)
library(RMKL)
#Load data
data(benchmark.data)
example.data=benchmark.data[[1]]
# Split samples into training and test sets
training.samples=sample(1:dim(example.data)[1],floor(0.7*dim(example.data)[1]),replace=FALSE)
# Set up cost parameters and kernels
C=100
kernels=rep('radial',3)
degree=rep(0,3)
scale=rep(0,3)
sigma=c(0,2^seq(-3:0))
K=kernels.gen(example.data[,1:2], training.samples, kernels, degree, scale, sigma)
K.train=K$K.train
SimpleMKL.classification(K.train,example.data[training.samples,3], C)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.