KlassenKlassenKlassenKlassen | | | | Operatoren

select_feature_set_trainf_mlpT_select_feature_set_trainf_mlpSelectFeatureSetTrainfMlpselect_feature_set_trainf_mlpSelectFeatureSetTrainfMlpSelectFeatureSetTrainfMlp (Operator)

Name

select_feature_set_trainf_mlpT_select_feature_set_trainf_mlpSelectFeatureSetTrainfMlpselect_feature_set_trainf_mlpSelectFeatureSetTrainfMlpSelectFeatureSetTrainfMlp — Wählt die optimalen Merkmale für ein bestimmtes OCR-Klassifikationsproblem aus.

Signatur

select_feature_set_trainf_mlp( : : TrainingFile, FeatureList, SelectionMethod, Width, Height, GenParamNames, GenParamValues : OCRHandle, FeatureSet, Score)

Herror T_select_feature_set_trainf_mlp(const Htuple TrainingFile, const Htuple FeatureList, const Htuple SelectionMethod, const Htuple Width, const Htuple Height, const Htuple GenParamNames, const Htuple GenParamValues, Htuple* OCRHandle, Htuple* FeatureSet, Htuple* Score)

Herror select_feature_set_trainf_mlp(const HTuple& TrainingFile, const HTuple& FeatureList, const HTuple& SelectionMethod, const HTuple& Width, const HTuple& Height, const HTuple& GenParamNames, const HTuple& GenParamValues, HTuple* OCRHandle, HTuple* FeatureSet, HTuple* Score)

HTuple HOCRMlp::SelectFeatureSetTrainfMlp(const HTuple& TrainingFile, const HTuple& FeatureList, const HTuple& SelectionMethod, const HTuple& Width, const HTuple& Height, const HTuple& GenParamNames, const HTuple& GenParamValues, HTuple* Score)

void SelectFeatureSetTrainfMlp(const HTuple& TrainingFile, const HTuple& FeatureList, const HTuple& SelectionMethod, const HTuple& Width, const HTuple& Height, const HTuple& GenParamNames, const HTuple& GenParamValues, HTuple* OCRHandle, HTuple* FeatureSet, HTuple* Score)

HTuple HOCRMlp::SelectFeatureSetTrainfMlp(const HTuple& TrainingFile, const HTuple& FeatureList, const HString& SelectionMethod, Hlong Width, Hlong Height, const HTuple& GenParamNames, const HTuple& GenParamValues, HTuple* Score)

HTuple HOCRMlp::SelectFeatureSetTrainfMlp(const HString& TrainingFile, const HString& FeatureList, const HString& SelectionMethod, Hlong Width, Hlong Height, const HString& GenParamNames, double GenParamValues, HTuple* Score)

HTuple HOCRMlp::SelectFeatureSetTrainfMlp(const char* TrainingFile, const char* FeatureList, const char* SelectionMethod, Hlong Width, Hlong Height, const char* GenParamNames, double GenParamValues, HTuple* Score)

void HOperatorSetX.SelectFeatureSetTrainfMlp(
[in] VARIANT TrainingFile, [in] VARIANT FeatureList, [in] VARIANT SelectionMethod, [in] VARIANT Width, [in] VARIANT Height, [in] VARIANT GenParamNames, [in] VARIANT GenParamValues, [out] VARIANT* OCRHandle, [out] VARIANT* FeatureSet, [out] VARIANT* Score)

VARIANT HOCRMlpX.SelectFeatureSetTrainfMlp(
[in] VARIANT TrainingFile, [in] VARIANT FeatureList, [in] BSTR SelectionMethod, [in] Hlong Width, [in] Hlong Height, [in] VARIANT GenParamNames, [in] VARIANT GenParamValues, [out] VARIANT* Score)

static void HOperatorSet.SelectFeatureSetTrainfMlp(HTuple trainingFile, HTuple featureList, HTuple selectionMethod, HTuple width, HTuple height, HTuple genParamNames, HTuple genParamValues, out HTuple OCRHandle, out HTuple featureSet, out HTuple score)

HTuple HOCRMlp.SelectFeatureSetTrainfMlp(HTuple trainingFile, HTuple featureList, string selectionMethod, int width, int height, HTuple genParamNames, HTuple genParamValues, out HTuple score)

HTuple HOCRMlp.SelectFeatureSetTrainfMlp(string trainingFile, string featureList, string selectionMethod, int width, int height, string genParamNames, double genParamValues, out HTuple score)

Beschreibung

select_feature_set_trainf_mlpselect_feature_set_trainf_mlpSelectFeatureSetTrainfMlpselect_feature_set_trainf_mlpSelectFeatureSetTrainfMlpSelectFeatureSetTrainfMlp wählt die optimalen Merkmale für ein bestimmtes OCR-Klassifikationsproblem aus. Die Daten für das OCR-Klassifikationsproblem werden mit der Trainingsdatei TrainingFileTrainingFileTrainingFileTrainingFileTrainingFiletrainingFile ausgewählt. Als Klassifikator wird ein mehrschichtiges Perzeptron (MLP) verwendet.

Es wird eine Untermenge aller angegebenen OCR-Merkmale gewählt. Alle zu untersuchenden Merkmale werden in FeatureListFeatureListFeatureListFeatureListFeatureListfeatureList spezifiziert. Die Liste der möglichen OCR-Merkmale wird in der Dokumentation von create_ocr_class_mlpcreate_ocr_class_mlpCreateOcrClassMlpcreate_ocr_class_mlpCreateOcrClassMlpCreateOcrClassMlp näher erläutert. Die letztendlich ausgewählte Merkmalsuntermenge wird in FeatureSetFeatureSetFeatureSetFeatureSetFeatureSetfeatureSet zurückgegeben.

select_feature_set_trainf_mlpselect_feature_set_trainf_mlpSelectFeatureSetTrainfMlpselect_feature_set_trainf_mlpSelectFeatureSetTrainfMlpSelectFeatureSetTrainfMlp ist auf OCR-Klassifikationsprobleme spezialisiert und unterstützt nur Merkmale die in der Auswahlliste stehen. Für andere Merkmale bietet sich somit die Nutzung des generellen Operators select_feature_set_mlpselect_feature_set_mlpSelectFeatureSetMlpselect_feature_set_mlpSelectFeatureSetMlpSelectFeatureSetMlp an.

Für den Selektionsprozess können in SelectionMethodSelectionMethodSelectionMethodSelectionMethodSelectionMethodselectionMethod zwei verschiedene Methoden ausgewählt werden: entweder die Greedy-Variante 'greedy'"greedy""greedy""greedy""greedy""greedy" (das momentan erfolgversprechendste Merkmal wird zur Auswahl hinzugefügt) oder die dynamisch oszillierende Suche 'greedy_oscillating'"greedy_oscillating""greedy_oscillating""greedy_oscillating""greedy_oscillating""greedy_oscillating" (Das momentan erfolgversprechendste Merkmal wird zur Auswahl hinzugefügt. Danach wird getestet ob eines der hinzugefügten Merkmale entbehrlich ist.). Während 'greedy'"greedy""greedy""greedy""greedy""greedy" schneller terminiert, kann 'greedy_oscillating'"greedy_oscillating""greedy_oscillating""greedy_oscillating""greedy_oscillating""greedy_oscillating" bessere Ergebnisse erzielen wenn viele Trainingsdaten vorliegen. Während 'greedy'"greedy""greedy""greedy""greedy""greedy" schneller terminiert, kann 'greedy_oscillating'"greedy_oscillating""greedy_oscillating""greedy_oscillating""greedy_oscillating""greedy_oscillating" besser mit voneinander abhängigen Merkmalen umgehen. Als Optimierungskriterium dient die Klassifikationsrate, die mit einem zwei-fachen Kreuzvalidierungsverfahren ermittelt wird. Das beste erreichte Klassifikationsrate wird in ScoreScoreScoreScoreScorescore zurückgegeben.

Über die generischen Parameter GenParamNamesGenParamNamesGenParamNamesGenParamNamesGenParamNamesgenParamNames und GenParamValuesGenParamValuesGenParamValuesGenParamValuesGenParamValuesgenParamValues kann die Anzahl der verwendeten Neuronen in der versteckten Schicht des MLP über 'num_hidden'"num_hidden""num_hidden""num_hidden""num_hidden""num_hidden" gesetzt werden. Standard ist hierfür 80, größere Werte führen zu längeren Trainingszeiten, erlauben aber eine ausdrucksstärkere Klassifikation.

Achtung

Die Laufzeit dieses Operators kann mit größeren Datensätzen und einer längeren Merkmalsliste unter Umständen sehr lang sein.

Es ist zu beachten, dass dieser Operator nicht aufgerufen werden sollte, wenn für das Training nur ein kleiner Datensatz verfügbar ist. Auf Grund des Risikos der Überanpassung kann der Operator select_feature_set_trainf_mlpselect_feature_set_trainf_mlpSelectFeatureSetTrainfMlpselect_feature_set_trainf_mlpSelectFeatureSetTrainfMlpSelectFeatureSetTrainfMlp zwar einerseits einen Klassifikator mit sehr hohem Score liefern. Andererseits weist der Klassifikator jedoch eine schlechte Erkennugsrate auf, wenn dieser getestet wird.

Parallelisierung

Dieser Operator liefert ein Handle zurück. Es ist zu beachten, dass der Zustand einer Instanz dieses Handletyps durch bestimmte Operatoren geändert werden kann, obwohl das Handle als Eingabeparameter in diesen Operatoren verwendet wird.

Parameter

TrainingFileTrainingFileTrainingFileTrainingFileTrainingFiletrainingFile (input_control)  filename.read(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Namen der Trainingsdateien.

Defaultwert: '' "" "" "" "" ""

Dateiendung: .trf, .otr

FeatureListFeatureListFeatureListFeatureListFeatureListfeatureList (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Merkmale, die zur Klassifikation verwendet werden können.

Defaultwert: ['zoom_factor','ratio','width','height','foreground','foreground_grid_9','foreground_grid_16','anisometry','compactness','convexity','moments_region_2nd_invar','moments_region_2nd_rel_invar','moments_region_3rd_invar','moments_central','phi','num_connect','num_holes','projection_horizontal','projection_vertical','projection_horizontal_invar','projection_vertical_invar','chord_histo','num_runs','pixel','pixel_invar','pixel_binary','gradient_8dir','cooc','moments_gray_plane'] ["zoom_factor","ratio","width","height","foreground","foreground_grid_9","foreground_grid_16","anisometry","compactness","convexity","moments_region_2nd_invar","moments_region_2nd_rel_invar","moments_region_3rd_invar","moments_central","phi","num_connect","num_holes","projection_horizontal","projection_vertical","projection_horizontal_invar","projection_vertical_invar","chord_histo","num_runs","pixel","pixel_invar","pixel_binary","gradient_8dir","cooc","moments_gray_plane"] ["zoom_factor","ratio","width","height","foreground","foreground_grid_9","foreground_grid_16","anisometry","compactness","convexity","moments_region_2nd_invar","moments_region_2nd_rel_invar","moments_region_3rd_invar","moments_central","phi","num_connect","num_holes","projection_horizontal","projection_vertical","projection_horizontal_invar","projection_vertical_invar","chord_histo","num_runs","pixel","pixel_invar","pixel_binary","gradient_8dir","cooc","moments_gray_plane"] ["zoom_factor","ratio","width","height","foreground","foreground_grid_9","foreground_grid_16","anisometry","compactness","convexity","moments_region_2nd_invar","moments_region_2nd_rel_invar","moments_region_3rd_invar","moments_central","phi","num_connect","num_holes","projection_horizontal","projection_vertical","projection_horizontal_invar","projection_vertical_invar","chord_histo","num_runs","pixel","pixel_invar","pixel_binary","gradient_8dir","cooc","moments_gray_plane"] ["zoom_factor","ratio","width","height","foreground","foreground_grid_9","foreground_grid_16","anisometry","compactness","convexity","moments_region_2nd_invar","moments_region_2nd_rel_invar","moments_region_3rd_invar","moments_central","phi","num_connect","num_holes","projection_horizontal","projection_vertical","projection_horizontal_invar","projection_vertical_invar","chord_histo","num_runs","pixel","pixel_invar","pixel_binary","gradient_8dir","cooc","moments_gray_plane"] ["zoom_factor","ratio","width","height","foreground","foreground_grid_9","foreground_grid_16","anisometry","compactness","convexity","moments_region_2nd_invar","moments_region_2nd_rel_invar","moments_region_3rd_invar","moments_central","phi","num_connect","num_holes","projection_horizontal","projection_vertical","projection_horizontal_invar","projection_vertical_invar","chord_histo","num_runs","pixel","pixel_invar","pixel_binary","gradient_8dir","cooc","moments_gray_plane"]

Werteliste: 'anisometry'"anisometry""anisometry""anisometry""anisometry""anisometry", 'chord_histo'"chord_histo""chord_histo""chord_histo""chord_histo""chord_histo", 'compactness'"compactness""compactness""compactness""compactness""compactness", 'convexity'"convexity""convexity""convexity""convexity""convexity", 'cooc'"cooc""cooc""cooc""cooc""cooc", 'default'"default""default""default""default""default", 'foreground'"foreground""foreground""foreground""foreground""foreground", 'foreground_grid_16'"foreground_grid_16""foreground_grid_16""foreground_grid_16""foreground_grid_16""foreground_grid_16", 'foreground_grid_9'"foreground_grid_9""foreground_grid_9""foreground_grid_9""foreground_grid_9""foreground_grid_9", 'gradient_8dir'"gradient_8dir""gradient_8dir""gradient_8dir""gradient_8dir""gradient_8dir", 'height'"height""height""height""height""height", 'moments_central'"moments_central""moments_central""moments_central""moments_central""moments_central", 'moments_gray_plane'"moments_gray_plane""moments_gray_plane""moments_gray_plane""moments_gray_plane""moments_gray_plane", 'moments_region_2nd_invar'"moments_region_2nd_invar""moments_region_2nd_invar""moments_region_2nd_invar""moments_region_2nd_invar""moments_region_2nd_invar", 'moments_region_2nd_rel_invar'"moments_region_2nd_rel_invar""moments_region_2nd_rel_invar""moments_region_2nd_rel_invar""moments_region_2nd_rel_invar""moments_region_2nd_rel_invar", 'moments_region_3rd_invar'"moments_region_3rd_invar""moments_region_3rd_invar""moments_region_3rd_invar""moments_region_3rd_invar""moments_region_3rd_invar", 'num_connect'"num_connect""num_connect""num_connect""num_connect""num_connect", 'num_holes'"num_holes""num_holes""num_holes""num_holes""num_holes", 'num_runs'"num_runs""num_runs""num_runs""num_runs""num_runs", 'phi'"phi""phi""phi""phi""phi", 'pixel'"pixel""pixel""pixel""pixel""pixel", 'pixel_binary'"pixel_binary""pixel_binary""pixel_binary""pixel_binary""pixel_binary", 'pixel_invar'"pixel_invar""pixel_invar""pixel_invar""pixel_invar""pixel_invar", 'projection_horizontal'"projection_horizontal""projection_horizontal""projection_horizontal""projection_horizontal""projection_horizontal", 'projection_horizontal_invar'"projection_horizontal_invar""projection_horizontal_invar""projection_horizontal_invar""projection_horizontal_invar""projection_horizontal_invar", 'projection_vertical'"projection_vertical""projection_vertical""projection_vertical""projection_vertical""projection_vertical", 'projection_vertical_invar'"projection_vertical_invar""projection_vertical_invar""projection_vertical_invar""projection_vertical_invar""projection_vertical_invar", 'ratio'"ratio""ratio""ratio""ratio""ratio", 'width'"width""width""width""width""width", 'zoom_factor'"zoom_factor""zoom_factor""zoom_factor""zoom_factor""zoom_factor"

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

Methode zur Auswahl der Merkmale.

Defaultwert: 'greedy' "greedy" "greedy" "greedy" "greedy" "greedy"

Werteliste: 'greedy'"greedy""greedy""greedy""greedy""greedy", 'greedy_oscillating'"greedy_oscillating""greedy_oscillating""greedy_oscillating""greedy_oscillating""greedy_oscillating"

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

Breite des Rechtecks, auf die die Grauwerte des segmentierten Zeichens skaliert werden.

Defaultwert: 15

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

Höhe des Rechtecks, auf die die Grauwerte des segmentierten Zeichens skaliert werden.

Defaultwert: 16

GenParamNamesGenParamNamesGenParamNamesGenParamNamesGenParamNamesgenParamNames (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Namen von (optionalen) Parametern für die Steuerung des Verhaltens des verwendeten MLP Klassifikators.

Defaultwert: []

Werteliste: 'nu'"nu""nu""nu""nu""nu"

GenParamValuesGenParamValuesGenParamValuesGenParamValuesGenParamValuesgenParamValues (input_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*) (double / Hlong / BSTR) (double / Hlong / char*)

Zu den optionalen generischen Parametern gehörende Werte.

Defaultwert: []

Wertevorschläge: '0.1'"0.1""0.1""0.1""0.1""0.1"

OCRHandleOCRHandleOCRHandleOCRHandleOCRHandleOCRHandle (output_control)  ocr_mlp HOCRMlp, HTupleHTupleHOCRMlp, HTupleHOCRMlpX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Mit den ausgewählten Merkmalen trainierter OCR-MLP-Klassifikator.

FeatureSetFeatureSetFeatureSetFeatureSetFeatureSetfeatureSet (output_control)  string-array HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Ausgewählte Merkmale.

ScoreScoreScoreScoreScorescore (output_control)  real-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Klassifikationsrate, die mit dem ausgewählten Merkmalssatz erreicht wurde.

Ergebnis

Sind die Parameterwerte korrekt, dann liefert select_feature_set_trainf_mlpselect_feature_set_trainf_mlpSelectFeatureSetTrainfMlpselect_feature_set_trainf_mlpSelectFeatureSetTrainfMlpSelectFeatureSetTrainfMlp den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Alternativen

select_feature_set_trainf_svmselect_feature_set_trainf_svmSelectFeatureSetTrainfSvmselect_feature_set_trainf_svmSelectFeatureSetTrainfSvmSelectFeatureSetTrainfSvm, select_feature_set_trainf_knnselect_feature_set_trainf_knnSelectFeatureSetTrainfKnnselect_feature_set_trainf_knnSelectFeatureSetTrainfKnnSelectFeatureSetTrainfKnn

Siehe auch

select_feature_set_trainf_mlp_protectedselect_feature_set_trainf_mlp_protectedSelectFeatureSetTrainfMlpProtectedselect_feature_set_trainf_mlp_protectedSelectFeatureSetTrainfMlpProtectedSelectFeatureSetTrainfMlpProtected, select_feature_set_mlpselect_feature_set_mlpSelectFeatureSetMlpselect_feature_set_mlpSelectFeatureSetMlpSelectFeatureSetMlp

Modul

OCR/OCV


KlassenKlassenKlassenKlassen | | | | Operatoren