Skip to content

get_support_vector_num_class_svmGetSupportVectorNumClassSvmGetSupportVectorNumClassSvmget_support_vector_num_class_svmT_get_support_vector_num_class_svm🔗

Short description🔗

get_support_vector_num_class_svmGetSupportVectorNumClassSvmGetSupportVectorNumClassSvmget_support_vector_num_class_svmT_get_support_vector_num_class_svm — Return the number of support vectors of a support vector machine.

Signature🔗

get_support_vector_num_class_svm( class_svm SVMHandle, out integer NumSupportVectors, out integer NumSVPerSVM )void GetSupportVectorNumClassSvm( const HTuple& SVMHandle, HTuple* NumSupportVectors, HTuple* NumSVPerSVM )static void HOperatorSet.GetSupportVectorNumClassSvm( HTuple SVMHandle, out HTuple numSupportVectors, out HTuple numSVPerSVM )def get_support_vector_num_class_svm( svmhandle: HHandle ) -> Tuple[int, Sequence[int]]

Herror T_get_support_vector_num_class_svm( const Htuple SVMHandle, Htuple* NumSupportVectors, Htuple* NumSVPerSVM )

Hlong HClassSvm::GetSupportVectorNumClassSvm( HTuple* NumSVPerSVM ) const

int HClassSvm.GetSupportVectorNumClassSvm( out HTuple numSVPerSVM )

Description🔗

get_support_vector_num_class_svmGetSupportVectorNumClassSvm returns in NumSupportVectorsnumSupportVectorsnum_support_vectors the number of support vectors that are stored in the support vector machine (SVM) given by SVMHandleSVMHandlesvmhandle. get_support_vector_num_class_svmGetSupportVectorNumClassSvm should be called before the labels of individual support vectors are read out with get_support_vector_class_svmGetSupportVectorClassSvm, e.g., for visualizing which the training data become a SV (see get_support_vector_class_svmGetSupportVectorClassSvm). The number of SVs in each classifier is listed in NumSVPerSVMnumSVPerSVMnum_svper_svm. The reason that its sum differs from the Number obtained in NumSupportVectorsnumSupportVectorsnum_support_vectors is that SV evaluations are reused throughout different sub-classifiers. NumSVPerSVMnumSVPerSVMnum_svper_svm provides the possibility for controlling the process of speeding up SVM classification time with the operator reduce_class_svmReduceClassSvm.

Execution information🔗

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🔗

SVMHandleSVMHandlesvmhandle (input_control) class_svm → (handle)HTuple (HHandle)HClassSvm, HTuple (IntPtr)HHandleHtuple (handle)

SVM handle.

NumSupportVectorsnumSupportVectorsnum_support_vectors (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Total number of support vectors.

NumSVPerSVMnumSVPerSVMnum_svper_svm (output_control) integer-array → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Number of SV of each sub-SVM.

Result🔗

If SVMHandleSVMHandlesvmhandle is valid the operator get_sample_num_class_svmGetSampleNumClassSvm returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

train_class_svmTrainClassSvm

Possible successors

get_sample_class_svmGetSampleClassSvm

See also

create_class_svmCreateClassSvm

Module🔗

Foundation