clear_samples_class_svm — Clear the training data of a support vector machine.
clear_samples_class_svm( : : SVMHandle : )
clear_samples_class_svm clears all training samples that have been added to the support vector machine (SVM) SVMHandle with add_sample_class_svm or read_samples_class_svm. clear_samples_class_svm should only be used if the SVM is trained in the same process that uses the SVM for classification with classify_class_svm. In this case, the memory required for the training samples can be freed with clear_samples_class_svm, and hence memory can be saved. In the normal usage, in which the SVM is trained offline and written to a file with write_class_svm, it is typically unnecessary to call clear_samples_class_svm because write_class_svm does not save the training samples, and hence the online process, which reads the SVM with read_class_svm, requires no memory for the training samples.
If the parameters are valid the operator clear_samples_class_svm returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.
create_class_svm, clear_class_svm, add_sample_class_svm, read_samples_class_svm