ClassesClassesClassesClasses | | | | Operators

reduce_ocr_class_svmreduce_ocr_class_svmReduceOcrClassSvmreduce_ocr_class_svmReduceOcrClassSvmReduceOcrClassSvm (Operator)

Name

reduce_ocr_class_svmreduce_ocr_class_svmReduceOcrClassSvmreduce_ocr_class_svmReduceOcrClassSvmReduceOcrClassSvm — Approximate a trained SVM-based OCR classifier by a reduced SVM.

Signature

reduce_ocr_class_svm( : : OCRHandle, Method, MinRemainingSV, MaxError : OCRHandleReduced)

Herror reduce_ocr_class_svm(const Hlong OCRHandle, const char* Method, const Hlong MinRemainingSV, double MaxError, Hlong* OCRHandleReduced)

Herror T_reduce_ocr_class_svm(const Htuple OCRHandle, const Htuple Method, const Htuple MinRemainingSV, const Htuple MaxError, Htuple* OCRHandleReduced)

Herror reduce_ocr_class_svm(const HTuple& OCRHandle, const HTuple& Method, const HTuple& MinRemainingSV, const HTuple& MaxError, Hlong* OCRHandleReduced)

HOCRSvm HOCRSvm::ReduceOcrClassSvm(const HTuple& Method, const HTuple& MinRemainingSV, const HTuple& MaxError) const

void ReduceOcrClassSvm(const HTuple& OCRHandle, const HTuple& Method, const HTuple& MinRemainingSV, const HTuple& MaxError, HTuple* OCRHandleReduced)

HOCRSvm HOCRSvm::ReduceOcrClassSvm(const HString& Method, Hlong MinRemainingSV, double MaxError) const

HOCRSvm HOCRSvm::ReduceOcrClassSvm(const char* Method, Hlong MinRemainingSV, double MaxError) const

void HOperatorSetX.ReduceOcrClassSvm(
[in] VARIANT OCRHandle, [in] VARIANT Method, [in] VARIANT MinRemainingSV, [in] VARIANT MaxError, [out] VARIANT* OCRHandleReduced)

IHOCRSvmX* HOCRSvmX.ReduceOcrClassSvm(
[in] BSTR Method, [in] Hlong MinRemainingSV, [in] double MaxError)

static void HOperatorSet.ReduceOcrClassSvm(HTuple OCRHandle, HTuple method, HTuple minRemainingSV, HTuple maxError, out HTuple OCRHandleReduced)

HOCRSvm HOCRSvm.ReduceOcrClassSvm(string method, int minRemainingSV, double maxError)

Description

reduce_ocr_class_svmreduce_ocr_class_svmReduceOcrClassSvmreduce_ocr_class_svmReduceOcrClassSvmReduceOcrClassSvm reduces the classification time of an SVM based OCR classifier OCRHandleOCRHandleOCRHandleOCRHandleOCRHandleOCRHandle by returning a reduced copy of it in OCRHandleReducedOCRHandleReducedOCRHandleReducedOCRHandleReducedOCRHandleReducedOCRHandleReduced. The parameters MethodMethodMethodMethodMethodmethod, MinRemainingSVMinRemainingSVMinRemainingSVMinRemainingSVMinRemainingSVminRemainingSV and MaxErrorMaxErrorMaxErrorMaxErrorMaxErrormaxError have the same meaning as in reduce_class_svmreduce_class_svmReduceClassSvmreduce_class_svmReduceClassSvmReduceClassSvm and are described there. Please note that classification time can also be significantly reduced with a preprocessing step in create_ocr_class_svmcreate_ocr_class_svmCreateOcrClassSvmcreate_ocr_class_svmCreateOcrClassSvmCreateOcrClassSvm, which possibly introduces less errors.

Parallelization

Parameters

OCRHandleOCRHandleOCRHandleOCRHandleOCRHandleOCRHandle (input_control)  ocr_svm HOCRSvm, HTupleHTupleHOCRSvm, HTupleHOCRSvmX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Original handle of SVM-based OCR-classifier.

MethodMethodMethodMethodMethodmethod (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Type of postprocessing to reduce number of SVs.

Default value: 'bottom_up' "bottom_up" "bottom_up" "bottom_up" "bottom_up" "bottom_up"

List of values: 'bottom_up'"bottom_up""bottom_up""bottom_up""bottom_up""bottom_up"

MinRemainingSVMinRemainingSVMinRemainingSVMinRemainingSVMinRemainingSVminRemainingSV (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Minimum number of remaining SVs.

Default value: 2

Suggested values: 2, 3, 4, 5, 7, 10, 15, 20, 30, 50

Restriction: MinRemainingSV >= 2

MaxErrorMaxErrorMaxErrorMaxErrorMaxErrormaxError (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Maximum allowed error of reduction.

Default value: 0.001

Suggested values: 0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05

Restriction: MaxError > 0.0

OCRHandleReducedOCRHandleReducedOCRHandleReducedOCRHandleReducedOCRHandleReducedOCRHandleReduced (output_control)  ocr_svm HOCRSvm, HTupleHTupleHOCRSvm, HTupleHOCRSvmX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

SVMHandle of reduced OCR classifier.

Result

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

Possible Predecessors

trainf_ocr_class_svmtrainf_ocr_class_svmTrainfOcrClassSvmtrainf_ocr_class_svmTrainfOcrClassSvmTrainfOcrClassSvm, get_support_vector_num_ocr_class_svmget_support_vector_num_ocr_class_svmGetSupportVectorNumOcrClassSvmget_support_vector_num_ocr_class_svmGetSupportVectorNumOcrClassSvmGetSupportVectorNumOcrClassSvm

Possible Successors

do_ocr_single_class_svmdo_ocr_single_class_svmDoOcrSingleClassSvmdo_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvm, do_ocr_multi_class_svmdo_ocr_multi_class_svmDoOcrMultiClassSvmdo_ocr_multi_class_svmDoOcrMultiClassSvmDoOcrMultiClassSvm, get_support_vector_ocr_class_svmget_support_vector_ocr_class_svmGetSupportVectorOcrClassSvmget_support_vector_ocr_class_svmGetSupportVectorOcrClassSvmGetSupportVectorOcrClassSvm, get_support_vector_num_ocr_class_svmget_support_vector_num_ocr_class_svmGetSupportVectorNumOcrClassSvmget_support_vector_num_ocr_class_svmGetSupportVectorNumOcrClassSvmGetSupportVectorNumOcrClassSvm

See also

create_ocr_class_svmcreate_ocr_class_svmCreateOcrClassSvmcreate_ocr_class_svmCreateOcrClassSvmCreateOcrClassSvm

References

Bernhard Schölkopf, Alexander J.Smola: “Lerning with Kernels”; The MIT Press, London; 1999.

Module

OCR/OCV


ClassesClassesClassesClasses | | | | Operators