learn_sampset_boxT_learn_sampset_boxLearnSampsetBoxLearnSampsetBoxlearn_sampset_box (Operator)

Name

learn_sampset_boxT_learn_sampset_boxLearnSampsetBoxLearnSampsetBoxlearn_sampset_box — Train the classifier with one data set.

Warning

learn_sampset_boxlearn_sampset_boxLearnSampsetBoxLearnSampsetBoxlearn_sampset_box is obsolete and is only provided for reasons of backward compatibility. New applications should use the MLP, SVM, KNN or GMM operators instead.

Signature

learn_sampset_box( : : ClassifHandle, SampKey, Outfile, NSamples, StopError, ErrorN : )

Herror T_learn_sampset_box(const Htuple ClassifHandle, const Htuple SampKey, const Htuple Outfile, const Htuple NSamples, const Htuple StopError, const Htuple ErrorN)

void LearnSampsetBox(const HTuple& ClassifHandle, const HTuple& SampKey, const HTuple& Outfile, const HTuple& NSamples, const HTuple& StopError, const HTuple& ErrorN)

void HFeatureSet::LearnSampsetBox(const HClassBox& ClassifHandle, const HString& Outfile, Hlong NSamples, double StopError, Hlong ErrorN) const

void HFeatureSet::LearnSampsetBox(const HClassBox& ClassifHandle, const char* Outfile, Hlong NSamples, double StopError, Hlong ErrorN) const

void HFeatureSet::LearnSampsetBox(const HClassBox& ClassifHandle, const wchar_t* Outfile, Hlong NSamples, double StopError, Hlong ErrorN) const   ( Windows only)

void HClassBox::LearnSampsetBox(const HFeatureSet& SampKey, const HString& Outfile, Hlong NSamples, double StopError, Hlong ErrorN) const

void HClassBox::LearnSampsetBox(const HFeatureSet& SampKey, const char* Outfile, Hlong NSamples, double StopError, Hlong ErrorN) const

void HClassBox::LearnSampsetBox(const HFeatureSet& SampKey, const wchar_t* Outfile, Hlong NSamples, double StopError, Hlong ErrorN) const   ( Windows only)

static void HOperatorSet.LearnSampsetBox(HTuple classifHandle, HTuple sampKey, HTuple outfile, HTuple NSamples, HTuple stopError, HTuple errorN)

void HFeatureSet.LearnSampsetBox(HClassBox classifHandle, string outfile, int NSamples, double stopError, int errorN)

void HClassBox.LearnSampsetBox(HFeatureSet sampKey, string outfile, int NSamples, double stopError, int errorN)

def learn_sampset_box(classif_handle: HHandle, samp_key: HHandle, outfile: str, nsamples: int, stop_error: float, error_n: int) -> None

Description

learn_sampset_boxlearn_sampset_boxLearnSampsetBoxLearnSampsetBoxlearn_sampset_box trains the classifier with data for the key SampKeySampKeySampKeysampKeysamp_key (see read_sampsetread_sampsetReadSampsetReadSampsetread_sampset). The training sequence is terminated at least after NSamplesNSamplesNSamplesNSamplesnsamples examples. If NSamplesNSamplesNSamplesNSamplesnsamples is bigger than the number of examples in SampKeySampKeySampKeysampKeysamp_key, then a cyclic start at the beginning occurs. If the error underpasses the value StopErrorStopErrorStopErrorstopErrorstop_error, then the training sequence is prematurely terminated. StopErrorStopErrorStopErrorstopErrorstop_error is calculated with N / ErrorN. Whereby N means the number of examples which were wrong classified during the last ErrorNErrorNErrorNerrorNerror_n training examples. Typically ErrorNErrorNErrorNerrorNerror_n is the number of examples in SampKeySampKeySampKeysampKeysamp_key and NSamplesNSamplesNSamplesNSamplesnsamples is a multiple of it. If you want a data set with 100 examples to run 5 times at most and if you want it to terminate with an error lower than 5%, then the corresponding values are NSamplesNSamplesNSamplesNSamplesnsamples = 500, ErrorNErrorNErrorNerrorNerror_n = 100 and StopErrorStopErrorStopErrorstopErrorstop_error = 0.05. A protocol of the training activity is going to be written in file OutfileOutfileOutfileoutfileoutfile.

Execution Information

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters

ClassifHandleClassifHandleClassifHandleclassifHandleclassif_handle (input_control, state is modified)  class_box HClassBox, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the classifier.

SampKeySampKeySampKeysampKeysamp_key (input_control)  feature_set HFeatureSet, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Number of the data set to train.

OutfileOutfileOutfileoutfileoutfile (input_control)  filename.write HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the protocol file.

Default: 'training_prot' "training_prot" "training_prot" "training_prot" "training_prot"

NSamplesNSamplesNSamplesNSamplesnsamples (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of arrays of attributes to learn.

Default: 500

StopErrorStopErrorStopErrorstopErrorstop_error (input_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Classification error for termination.

Default: 0.05

ErrorNErrorNErrorNerrorNerror_n (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Error during the assignment.

Default: 100

Result

learn_sampset_boxlearn_sampset_boxLearnSampsetBoxLearnSampsetBoxlearn_sampset_box returns 2 ( H_MSG_TRUE) . An exception is raised if key SampKeySampKeySampKeysampKeysamp_key does not exist or there are problems while opening the file.

Possible Predecessors

create_class_boxcreate_class_boxCreateClassBoxCreateClassBoxcreate_class_box

Possible Successors

test_sampset_boxtest_sampset_boxTestSampsetBoxTestSampsetBoxtest_sampset_box, enquire_class_boxenquire_class_boxEnquireClassBoxEnquireClassBoxenquire_class_box, write_class_boxwrite_class_boxWriteClassBoxWriteClassBoxwrite_class_box, close_class_boxclose_class_boxCloseClassBoxCloseClassBoxclose_class_box, clear_sampsetclear_sampsetClearSampsetClearSampsetclear_sampset

See also

test_sampset_boxtest_sampset_boxTestSampsetBoxTestSampsetBoxtest_sampset_box, enquire_class_boxenquire_class_boxEnquireClassBoxEnquireClassBoxenquire_class_box, learn_class_boxlearn_class_boxLearnClassBoxLearnClassBoxlearn_class_box, read_sampsetread_sampsetReadSampsetReadSampsetread_sampset

Module

Foundation