add_sample_class_train_data — Add a training sample to training data.
add_sample_class_train_data adds a training sample to the training data given by ClassTrainDataHandle. The training sample is given by Features and ClassID. Features is the feature vector of the sample, and consequently must be a real vector of length NumDim, as specified in create_class_train_data. ClassID is the class of the sample. More than one trainings sample can be added at once. In this case the parameter Order defines in which order the elements of the feature vectors are passed in Features. If it is set to 'row', the first training sample comes first, the second comes second, and so on. If it is set to 'column', the first dimension of all feature vectors comes first, and then the second dimension of all feature vectors, and so on. The third possible mode for Order is 'feature_column'. This mode expects features which were grouped before with set_feature_lengths_class_train_data to come completely and row-wise before the second feature, and so on.
This operator modifies the state of the following input parameter:
Handle of the training data.
The order of the feature vector.
Default value: 'row'
List of values: 'column', 'feature_column', 'row'
Feature vector of the training sample.
Class of the training sample.
If the parameters are valid, the operator add_sample_class_train_data returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.
add_class_train_data_svm, add_class_train_data_knn, add_class_train_data_gmm, add_class_train_data_mlp