param describes the parameters used to obtain the model.
- nr_class and nr_feature are the number of classes and features,
- respectively. nr_class = 2 for regression.
+ nr_class is the number of classes for classification. It is a
+ non-negative integer with special cases of 0 (no training data at
+ all) and 1 (all training data in one class). For regression and
+ one-class SVM, nr_class = 2.
+
+ nr_feature is the number of features.
The array w gives feature weights; its size is
- nr_feature*nr_class but is nr_feature if nr_class = 2. We use one
- against the rest for multi-class classification, so each feature
- index corresponds to nr_class weight values. Weights are
- organized in the following way
+ nr_feature*nr_class but is nr_feature if nr_class = 2 (see more
+ explanation below). We use one against the rest for multi-class
+ classification, so each feature index corresponds to nr_class
+ weight values. Weights are organized in the following way
+------------------+------------------+------------+
| nr_class weights | nr_class weights | ...
The array label stores class labels.
+ For classification, if nr_class = 1 or 2, the single vector of
+ weights is obtained by considering label[0] as positive.
+
If bias >= 0, x becomes [x; bias]. The number of features is
increased by one, so w is a (nr_feature+1)*nr_class array. The
value of bias is stored in the variable bias.