clear_samples_class_svmT_clear_samples_class_svmClearSamplesClassSvmClearSamplesClassSvmclear_samples_class_svm (Operator)
Name
clear_samples_class_svmT_clear_samples_class_svmClearSamplesClassSvmClearSamplesClassSvmclear_samples_class_svm
— Clear the training data of a support vector machine.
Signature
Herror T_clear_samples_class_svm(const Htuple SVMHandle)
def clear_samples_class_svm(svmhandle: MaybeSequence[HHandle]) -> None
Description
clear_samples_class_svmclear_samples_class_svmClearSamplesClassSvmClearSamplesClassSvmClearSamplesClassSvmclear_samples_class_svm
clears all training samples that
have been added to the support vector machine (SVM)
SVMHandleSVMHandleSVMHandleSVMHandleSVMHandlesvmhandle
with add_sample_class_svmadd_sample_class_svmAddSampleClassSvmAddSampleClassSvmAddSampleClassSvmadd_sample_class_svm
or
read_samples_class_svmread_samples_class_svmReadSamplesClassSvmReadSamplesClassSvmReadSamplesClassSvmread_samples_class_svm
. clear_samples_class_svmclear_samples_class_svmClearSamplesClassSvmClearSamplesClassSvmClearSamplesClassSvmclear_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_svmclassify_class_svmClassifyClassSvmClassifyClassSvmClassifyClassSvmclassify_class_svm
. In
this case, the memory required for the training samples can be freed
with clear_samples_class_svmclear_samples_class_svmClearSamplesClassSvmClearSamplesClassSvmClearSamplesClassSvmclear_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_svmwrite_class_svmWriteClassSvmWriteClassSvmWriteClassSvmwrite_class_svm
, it is typically unnecessary
to call clear_samples_class_svmclear_samples_class_svmClearSamplesClassSvmClearSamplesClassSvmClearSamplesClassSvmclear_samples_class_svm
because
write_class_svmwrite_class_svmWriteClassSvmWriteClassSvmWriteClassSvmwrite_class_svm
does not save the training samples, and
hence the online process, which reads the SVM with
read_class_svmread_class_svmReadClassSvmReadClassSvmReadClassSvmread_class_svm
, requires no memory for the training
samples.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
This operator modifies the state of the following input parameter:
During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.
Parameters
SVMHandleSVMHandleSVMHandleSVMHandleSVMHandlesvmhandle
(input_control, state is modified) class_svm(-array) →
HClassSvm, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)
SVM handle.
Result
If the parameters are valid the operator
clear_samples_class_svmclear_samples_class_svmClearSamplesClassSvmClearSamplesClassSvmClearSamplesClassSvmclear_samples_class_svm
returns the value TRUE. If
necessary, an exception is raised.
Possible Predecessors
train_class_svmtrain_class_svmTrainClassSvmTrainClassSvmTrainClassSvmtrain_class_svm
,
write_samples_class_svmwrite_samples_class_svmWriteSamplesClassSvmWriteSamplesClassSvmWriteSamplesClassSvmwrite_samples_class_svm
See also
create_class_svmcreate_class_svmCreateClassSvmCreateClassSvmCreateClassSvmcreate_class_svm
,
clear_class_svmclear_class_svmClearClassSvmClearClassSvmClearClassSvmclear_class_svm
,
add_sample_class_svmadd_sample_class_svmAddSampleClassSvmAddSampleClassSvmAddSampleClassSvmadd_sample_class_svm
,
read_samples_class_svmread_samples_class_svmReadSamplesClassSvmReadSamplesClassSvmReadSamplesClassSvmread_samples_class_svm
Module
Foundation