Java weka.classifiers.functions LibSVM fields, constructors, methods, implement or subclass

Example usage for Java weka.classifiers.functions LibSVM fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for weka.classifiers.functions LibSVM.

The text is from its open source code.

Field

intSVMTYPE_C_SVC
SVM type C-SVC (classification).
intSVMTYPE_NU_SVC
SVM type nu-SVC (classification).
intSVMTYPE_ONE_CLASS_SVM
SVM type one-class SVM (classification).
intSVMTYPE_EPSILON_SVR
SVM type epsilon-SVR (regression).
intSVMTYPE_NU_SVR
SVM type nu-SVR (regression).
Tag[]TAGS_SVMTYPE
SVM types.
intKERNELTYPE_LINEAR
kernel type linear: u'*v.
intKERNELTYPE_POLYNOMIAL
kernel type polynomial: (gamma*u'*v + coef0)^degree.
intKERNELTYPE_RBF
kernel type radial basis function: exp(-gamma*|u-v|^2).
intKERNELTYPE_SIGMOID
kernel type sigmoid: tanh(gamma*u'*v + coef0).
Tag[]TAGS_KERNELTYPE
the different kernel types.

Constructor

Method

voidbuildClassifier(Instances insts)
builds the classifier.
voidsetCacheSize(double value)
Sets cache memory size in MB (default 40).
voidsetCoef0(double value)
Sets coef (default 0).
voidsetCost(double value)
Sets the parameter C of C-SVC, epsilon-SVR, and nu-SVR (default 1).
voidsetDegree(int value)
Sets the degree of the kernel.
voidsetEps(double value)
Sets tolerance of termination criterion (default 0.001).
voidsetGamma(double value)
Sets gamma (default = 1/no of attributes).
voidsetKernelType(SelectedTag value)
Sets type of kernel function (default KERNELTYPE_RBF).
voidsetLoss(double value)
Sets the epsilon in loss function of epsilon-SVR (default 0.1).
voidsetNormalize(boolean value)
whether to normalize input data.
voidsetNu(double value)
Sets nu of nu-SVC, one-class SVM, and nu-SVR (default 0.5).
voidsetOptions(String[] options)
Sets the classifier options

Valid options are:

 -S <int> Set type of SVM (default: 0) 0 = C-SVC 1 = nu-SVC 2 = one-class SVM 3 = epsilon-SVR 4 = nu-SVR

 -K <int> Set type of kernel function (default: 2) 0 = linear: u'*v 1 = polynomial: (gamma*u'*v + coef0)^degree 2 = radial basis function: exp(-gamma*|u-v|^2) 3 = sigmoid: tanh(gamma*u'*v + coef0)

 -D <int> Set degree in kernel function (default: 3)

 -G <double> Set gamma in kernel function (default: 1/k)

 -R <double> Set coef0 in kernel function (default: 0)

 -C <double> Set the parameter C of C-SVC, epsilon-SVR, and nu-SVR (default: 1)

 -N <double> Set the parameter nu of nu-SVC, one-class SVM, and nu-SVR (default: 0.5)

 -Z Turns on normalization of input data (default: off)

 -J Turn off nominal to binary conversion. 
voidsetShrinking(boolean value)
whether to use the shrinking heuristics.
voidsetSVMType(SelectedTag value)
Sets type of SVM (default SVMTYPE_C_SVC).