get_support_vector_class_svmT_get_support_vector_class_svmGetSupportVectorClassSvmGetSupportVectorClassSvmget_support_vector_class_svm (Operator)
Name
get_support_vector_class_svmT_get_support_vector_class_svmGetSupportVectorClassSvmGetSupportVectorClassSvmget_support_vector_class_svm
— Return the index of a support vector from a trained support vector
machine.
Signature
Description
The operator get_support_vector_class_svmget_support_vector_class_svmGetSupportVectorClassSvmGetSupportVectorClassSvmGetSupportVectorClassSvmget_support_vector_class_svm
maps a support
vector of a trained SVM (given in SVMHandleSVMHandleSVMHandleSVMHandleSVMHandlesvmhandle
) to the
original training data set. The index of the SV is specified with
IndexSupportVectorIndexSupportVectorIndexSupportVectorIndexSupportVectorindexSupportVectorindex_support_vector
. The index is counted from 0, i.e.,
IndexSupportVectorIndexSupportVectorIndexSupportVectorIndexSupportVectorindexSupportVectorindex_support_vector
must be a number between 0 and
NumSupportVectorsNumSupportVectorsNumSupportVectorsNumSupportVectorsnumSupportVectorsnum_support_vectors
- 1, where
NumSupportVectorsNumSupportVectorsNumSupportVectorsNumSupportVectorsnumSupportVectorsnum_support_vectors
can be determined with
get_support_vector_num_class_svmget_support_vector_num_class_svmGetSupportVectorNumClassSvmGetSupportVectorNumClassSvmGetSupportVectorNumClassSvmget_support_vector_num_class_svm
. The index of this SV in
the training data is returned in IndexIndexIndexIndexindexindex
. This
IndexIndexIndexIndexindexindex
can be used for a query with
get_sample_class_svmget_sample_class_svmGetSampleClassSvmGetSampleClassSvmGetSampleClassSvmget_sample_class_svm
to obtain the feature vectors that
become support vectors. get_sample_class_svmget_sample_class_svmGetSampleClassSvmGetSampleClassSvmGetSampleClassSvmget_sample_class_svm
can, for
example, be used to visualize the support vectors.
Note that when using train_class_svmtrain_class_svmTrainClassSvmTrainClassSvmTrainClassSvmtrain_class_svm
with a mode different from
'default'"default""default""default""default""default" or reducing the SVM with reduce_class_svmreduce_class_svmReduceClassSvmReduceClassSvmReduceClassSvmreduce_class_svm
, the
returned IndexIndexIndexIndexindexindex
will always be -1, i.e., it will be invalid.
The reason for this is that a consistent mapping between SV and
training data becomes impossible.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
SVMHandleSVMHandleSVMHandleSVMHandleSVMHandlesvmhandle
(input_control) class_svm →
HClassSvm, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
SVM handle.
IndexSupportVectorIndexSupportVectorIndexSupportVectorIndexSupportVectorindexSupportVectorindex_support_vector
(input_control) integer →
HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Index of the stored support vector.
IndexIndexIndexIndexindexindex
(output_control) real →
HTuplefloatHTupleHtuple (real) (double) (double) (double)
Index of the support vector in the training set.
Result
If the parameters are valid the operator get_sample_class_svmget_sample_class_svmGetSampleClassSvmGetSampleClassSvmGetSampleClassSvmget_sample_class_svm
returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.
Possible Predecessors
train_class_svmtrain_class_svmTrainClassSvmTrainClassSvmTrainClassSvmtrain_class_svm
,
get_support_vector_num_class_svmget_support_vector_num_class_svmGetSupportVectorNumClassSvmGetSupportVectorNumClassSvmGetSupportVectorNumClassSvmget_support_vector_num_class_svm
Possible Successors
get_sample_class_svmget_sample_class_svmGetSampleClassSvmGetSampleClassSvmGetSampleClassSvmget_sample_class_svm
See also
create_class_svmcreate_class_svmCreateClassSvmCreateClassSvmCreateClassSvmcreate_class_svm
Module
Foundation