1. >>help svmtrain
SVMSTRUCT = svmtrain(TRAINING, Y)trains a support vector machine (SVM) classifier on data taken from two groups. TRAINING is a numeric matrix of predictor data(TRAINING是预测数据的一个数阵). Rows of TRAINING correspond to observations(TRAINING的行数代表样本数); columns correspond to features(列数代表特征的维数). Y is a column vector that contains the known class labels for TRAINING(Y是列向量,里面存着TRAINING的分类标签). Y is a grouping variable, i.e., it can be a categorical, numeric, or logical vector; a cell vector of strings; or a character matrix with each row representing a class label (see help for groupingvariable). Each element of Y specifies the group the corresponding row of TRAINING belongs to. TRAINING and Y must have the same number of rows. SVMSTRUCT contains information about the trained classifier, including the support vectors, that is used by SVMCLASSIFY for classification(SVMSTRUCT结构体中包含了训练好的分类器的所有参数,包括支持向量,这些支持向量也用于对测试集进行分类). svmtrain treats NaNs, empty strings or 'undefined'values as missing values and ignores the corresponding rows in TRAINING and Y.
2.分类机的参量选择svmtrain
********************************************************************************************
'kernel_function' A string or a function handle specifying the kernel function used to represent the dot product in a new space. The value can be one of the following:
*******************************************************'linear' - Linear kernel or dot product (default). In this case, svmtrain finds the optimal separating plane in the original space.'quadratic' - Quadratic kernel(二次核函数)'polynomial' - Polynomial kernel with default order 3. To specify another order, use the 'polyorder' argument.(多项式核函数,默认是3阶,如果需要提升,在‘polyorder’进行参数设置)'rbf' - Gaussian Radial Basis Function with default scaling factor 1. To specify another scaling factor, use the 'rbf_sigma' argument.(高斯径向核函数,默认核宽为1,在‘rbf_sigma’可以进行参数设置)'mlp' - Multilayer Perceptron kernel (MLP) with default weight 1 and default bias -1. To specify another weight or bias, use the 'mlp_params' argument.(多层感知核函数,默认权重1,偏好-1)