Skip to content

classify_class_svmClassifyClassSvmClassifyClassSvmclassify_class_svmT_classify_class_svm๐Ÿ”—

Short description๐Ÿ”—

classify_class_svmClassifyClassSvmClassifyClassSvmclassify_class_svmT_classify_class_svm โ€” Classify a feature vector by a support vector machine.

Signature๐Ÿ”—

classify_class_svm( class_svm SVMHandle, real Features, integer Num, out integer Class )void ClassifyClassSvm( const HTuple& SVMHandle, const HTuple& Features, const HTuple& Num, HTuple* Class )static void HOperatorSet.ClassifyClassSvm( HTuple SVMHandle, HTuple features, HTuple num, out HTuple classVal )def classify_class_svm( svmhandle: HHandle, features: Sequence[float], num: Sequence[int] ) -> Sequence[int]

def classify_class_svm_s( svmhandle: HHandle, features: Sequence[float], num: Sequence[int] ) -> intHerror T_classify_class_svm( const Htuple SVMHandle, const Htuple Features, const Htuple Num, Htuple* Class )

HTuple HClassSvm::ClassifyClassSvm( const HTuple& Features, const HTuple& Num ) const

HTuple HClassSvm.ClassifyClassSvm( HTuple features, HTuple num )

Description๐Ÿ”—

classify_class_svmClassifyClassSvm computes the best Numnumnum classes of the feature vector Featuresfeaturesfeatures with the SVM SVMHandleSVMHandlesvmhandle and returns them in ClassclassValclass. If the classifier was created in the Modemodemode \(=\) 'one-versus-one'"one-versus-one", the classes are ordered by the number of votes of the sub-classifiers. If Modemodemode \(=\) 'one-versus-all'"one-versus-all" was used, the classes are ordered by the value of each sub-classifier (see create_class_svmCreateClassSvm for more details). If the classifier was created in the Modemodemode \(=\) 'novelty-detection'"novelty-detection", it determines whether the feature vector belongs to the same class as the training data (\(\textrm{Class} = 1\)) or is regarded as outlier (\(\textrm{Class} = 0\)). In this case Numnumnum must be set to \(1\) as the classifier only determines membership.

Before calling classify_class_svmClassifyClassSvm, the SVM must be trained with train_class_svmTrainClassSvm.

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.

Featuresfeaturesfeatures (input_control) real-array โ†’ (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Feature vector.

Numnumnum (input_control) integer-array โ†’ (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Number of best classes to determine.

Default: 11
Suggested values: 1, 2, 3, 4, 51, 2, 3, 4, 5

ClassclassValclass (output_control) integer(-array) โ†’ (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Result of classifying the feature vector with the SVM.

Result๐Ÿ”—

If the parameters are valid the operator classify_class_svmClassifyClassSvm returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Combinations with other operators๐Ÿ”—

Combinations

Possible predecessors

train_class_svmTrainClassSvm, read_class_svmReadClassSvm

Alternatives

apply_dl_modelApplyDlModel

See also

create_class_svmCreateClassSvm

References๐Ÿ”—

John Shawe-Taylor, Nello Cristianini: ``Kernel Methods for Pattern Analysisโ€™โ€˜; Cambridge University Press, Cambridge; 2004.

Bernhard Schรถlkopf, Alexander J.Smola: โ€œLearning with Kernelsโ€; MIT Press, London; 1999.

Module๐Ÿ”—

Foundation