Train support vector machine classifier
svmtrain
will be removed in a future release.
See fitcsvm
, ClassificationSVM
,
and CompactClassificationSVM
instead.
SVMStruct = svmtrain(Training,Group)
SVMStruct = svmtrain(Training,Group,Name,Value)
returns
a structure, SVMStruct
= svmtrain(Training
,Group
)SVMStruct
, containing information
about the trained support vector machine (SVM) classifier.
returns
a structure with additional options specified by one or more SVMStruct
= svmtrain(Training
,Group
,Name,Value
)Name,Value
pair
arguments.

Matrix of training data, where each row corresponds to an observation
or replicate, and each column corresponds to a feature or variable. 

Grouping variable, which can be a categorical, numeric, or logical
vector, a cell array of character vectors, or a character matrix with
each row representing a class label. Each element of 
Specify optional
commaseparated pairs of Name,Value
arguments. Name
is
the argument name and Value
is the corresponding value.
Name
must appear inside single quotes (' '
). You can
specify several name and value pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.

Boolean specifying whether Default:  

Value of the box constraint If If Default:  

Value that specifies the size of the kernel matrix cache for
the SMO training method. The algorithm keeps a matrix with up to Default:  

Kernel function
Default:  

Value that specifies the fraction of variables allowed to violate
the KarushKuhnTucker (KKT) conditions for the SMO training method.
Set any value in [0,1). For example, if you set TipSet this option to a positive value to help the algorithm converge if it is fluctuating near a good solution. For more information on KKT conditions, see Cristianini and ShaweTaylor [4]. Default:  

Method used to find the separating hyperplane. Options are:
Default:  

Parameters of the Multilayer Perceptron ( Default:  

Options structure for training.
 

Order of the polynomial kernel. Default:  

Scaling factor (sigma) in the radial basis function kernel. Default:  

Boolean indicating whether to plot the grouped data and separating line. Creates a plot only when the data has two columns (features). Default:  

Value that specifies the tolerance with which the KarushKuhnTucker (KKT) conditions are checked for the SMO training method. For a definition of KKT conditions, see KarushKuhnTucker (KKT) Conditions. Default: 

Structure containing information about the trained SVM classifier in the following fields:

To classify new data, use the result of training, SVMStruct
,
with the svmclassify
function.
[1] Kecman, V., Learning and Soft Computing, MIT Press, Cambridge, MA. 2001.
[2] Suykens, J.A.K., Van Gestel, T., De Brabanter, J., De Moor, B., and Vandewalle, J., Least Squares Support Vector Machines, World Scientific, Singapore, 2002.
[3] Scholkopf, B., and Smola, A.J., Learning with Kernels, MIT Press, Cambridge, MA. 2002.
[4] Cristianini, N., and ShaweTaylor, J.
(2000). An Introduction to Support Vector Machines and Other Kernelbased
Learning Methods, First Edition (Cambridge: Cambridge University Press). http://www.supportvector.net/