classify_class_svmT_classify_class_svmClassifyClassSvmClassifyClassSvmclassify_class_svm (Operator)
Name
classify_class_svmT_classify_class_svmClassifyClassSvmClassifyClassSvmclassify_class_svm
— Classify a feature vector by a support vector machine.
Signature
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]) -> int
Description
classify_class_svmclassify_class_svmClassifyClassSvmClassifyClassSvmClassifyClassSvmclassify_class_svm
computes the best NumNumNumNumnumnum
classes of
the feature vector FeaturesFeaturesFeaturesFeaturesfeaturesfeatures
with the SVM SVMHandleSVMHandleSVMHandleSVMHandleSVMHandlesvmhandle
and returns them in ClassClassClassClassclassValclass
. If the classifier was
created in the ModeModeModeModemodemode
= 'one-versus-one'"one-versus-one""one-versus-one""one-versus-one""one-versus-one""one-versus-one", the
classes are ordered by the number of votes of the sub-classifiers. If
ModeModeModeModemodemode
= 'one-versus-all'"one-versus-all""one-versus-all""one-versus-all""one-versus-all""one-versus-all" was used, the classes are ordered
by the value of each sub-classifier (see create_class_svmcreate_class_svmCreateClassSvmCreateClassSvmCreateClassSvmcreate_class_svm
for more
details). If the classifier was created in the ModeModeModeModemodemode
=
'novelty-detection'"novelty-detection""novelty-detection""novelty-detection""novelty-detection""novelty-detection", it determines whether the feature vector
belongs to the same class as the training data (ClassClassClassClassclassValclass
= 1) or is
regarded as outlier (ClassClassClassClassclassValclass
= 0). In this case NumNumNumNumnumnum
must be
set to 1 as the classifier only determines membership.
Before calling classify_class_svmclassify_class_svmClassifyClassSvmClassifyClassSvmClassifyClassSvmclassify_class_svm
, the SVM must be trained
with train_class_svmtrain_class_svmTrainClassSvmTrainClassSvmTrainClassSvmtrain_class_svm
.
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.
FeaturesFeaturesFeaturesFeaturesfeaturesfeatures
(input_control) real-array →
HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Feature vector.
NumNumNumNumnumnum
(input_control) integer-array →
HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of best classes to determine.
Default value: 1
Suggested values: 1, 2, 3, 4, 5
ClassClassClassClassclassValclass
(output_control) integer(-array) →
HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Result of classifying the feature vector with
the SVM.
Result
If the parameters are valid the operator classify_class_svmclassify_class_svmClassifyClassSvmClassifyClassSvmClassifyClassSvmclassify_class_svm
returns the value TRUE. If necessary, an exception is
raised.
Possible Predecessors
train_class_svmtrain_class_svmTrainClassSvmTrainClassSvmTrainClassSvmtrain_class_svm
,
read_class_svmread_class_svmReadClassSvmReadClassSvmReadClassSvmread_class_svm
Alternatives
apply_dl_classifierapply_dl_classifierApplyDlClassifierApplyDlClassifierApplyDlClassifierapply_dl_classifier
See also
create_class_svmcreate_class_svmCreateClassSvmCreateClassSvmCreateClassSvmcreate_class_svm
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