sigest | R Documentation |
Given a range of values for the "sigma" inverse width parameter in the Gaussian Radial Basis kernel for use with Support Vector Machines. The estimation is based on the data to be used.
## S4 method for signature 'formula' sigest(x, data=NULL, frac = 0.5, na.action = na.omit, scaled = TRUE) ## S4 method for signature 'matrix' sigest(x, frac = 0.5, scaled = TRUE, na.action = na.omit)
x |
a symbolic description of the model upon the estimation is based. When not using a formula x is a matrix or vector containing the data |
data |
an optional data frame containing the variables in the model. By default the variables are taken from the environment which ‘ksvm’ is called from. |
frac |
Fraction of data to use for estimation. By default a quarter of the data is used to estimate the range of the sigma hyperparameter. |
scaled |
A logical vector indicating the variables to be
scaled. If |
na.action |
A function to specify the action to be taken if |
sigest
estimates the range of values for the sigma parameter
which would return good results when used with a Support Vector
Machine (ksvm
). The estimation is based upon the 0.1 and 0.9 quantile
of \|x -x'\|^2. Basically any value in between those two bounds will
produce good results.
Returns a vector of length 3 defining the range (0.1 quantile, median and 0.9 quantile) of the sigma hyperparameter.
Alexandros Karatzoglou
alexandros.karatzoglou@ci.tuwien.ac.at
B. Caputo, K. Sim, F. Furesjo, A. Smola,
Appearance-based object recognition using SVMs: which kernel should I use?
Proc of NIPS workshop on Statitsical methods for computational experiments in visual processing and computer vision, Whistler, 2002.
ksvm
## estimate good sigma values for promotergene data(promotergene) srange <- sigest(Class~.,data = promotergene) srange s <- srange[2] s ## create test and training set ind <- sample(1:dim(promotergene)[1],20) genetrain <- promotergene[-ind, ] genetest <- promotergene[ind, ] ## train a support vector machine gene <- ksvm(Class~.,data=genetrain,kernel="rbfdot", kpar=list(sigma = s),C=50,cross=3) gene ## predict gene type on the test set promoter <- predict(gene,genetest[,-1]) ## Check results table(promoter,genetest[,1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.