Skip to content

classify_class_mlpClassifyClassMlpClassifyClassMlpclassify_class_mlpT_classify_class_mlp๐Ÿ”—

Short description๐Ÿ”—

classify_class_mlpClassifyClassMlpClassifyClassMlpclassify_class_mlpT_classify_class_mlp โ€” Calculate the class of a feature vector by a multilayer perceptron.

Signature๐Ÿ”—

classify_class_mlp( class_mlp MLPHandle, real Features, integer Num, out integer Class, out real Confidence )void ClassifyClassMlp( const HTuple& MLPHandle, const HTuple& Features, const HTuple& Num, HTuple* Class, HTuple* Confidence )static void HOperatorSet.ClassifyClassMlp( HTuple MLPHandle, HTuple features, HTuple num, out HTuple classVal, out HTuple confidence )def classify_class_mlp( mlphandle: HHandle, features: Sequence[float], num: Sequence[int] ) -> Tuple[Sequence[int], Sequence[float]]

def classify_class_mlp_s( mlphandle: HHandle, features: Sequence[float], num: Sequence[int] ) -> Tuple[int, float]Herror T_classify_class_mlp( const Htuple MLPHandle, const Htuple Features, const Htuple Num, Htuple* Class, Htuple* Confidence )

HTuple HClassMlp::ClassifyClassMlp( const HTuple& Features, const HTuple& Num, HTuple* Confidence ) const

Hlong HClassMlp::ClassifyClassMlp( const HTuple& Features, const HTuple& Num, double* Confidence ) const

HTuple HClassMlp.ClassifyClassMlp( HTuple features, HTuple num, out HTuple confidence )

int HClassMlp.ClassifyClassMlp( HTuple features, HTuple num, out double confidence )

Description๐Ÿ”—

classify_class_mlpClassifyClassMlp computes the best Numnumnum classes of the feature vector Featuresfeaturesfeatures with the multilayer perceptron (MLP) MLPHandleMLPHandlemlphandle and returns the classes in ClassclassValclass and the corresponding confidences (probabilities) of the classes in Confidenceconfidenceconfidence. Before calling classify_class_mlpClassifyClassMlp, the MLP must be trained with train_class_mlpTrainClassMlp.

classify_class_mlpClassifyClassMlp can only be called if the MLP is used as a classifier with OutputFunctionoutputFunctionoutput_function \(=\) 'softmax'"softmax" (see create_class_mlpCreateClassMlp). Otherwise, an error message is returned. classify_class_mlpClassifyClassMlp corresponds to a call to evaluate_class_mlpEvaluateClassMlp and an additional step that extracts the best Numnumnum classes. As described with evaluate_class_mlpEvaluateClassMlp, the output values of the MLP can be interpreted as probabilities of the occurrence of the respective classes. In most cases it should be sufficient to use Numnumnum \(=\) 11 in order to decide whether the probability of the best class is high enough. In some applications it may be interesting to also take the second best class into account (Numnumnum \(=\) 22), particularly if it can be expected that the classes show a significant degree of overlap.

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๐Ÿ”—

MLPHandleMLPHandlemlphandle (input_control) class_mlp โ†’ (handle)HTuple (HHandle)HClassMlp, HTuple (IntPtr)HHandleHtuple (handle)

MLP 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 MLP.

Confidenceconfidenceconfidence (output_control) real(-array) โ†’ (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Confidence(s) of the class(es) of the feature vector.

Result๐Ÿ”—

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

Combinations with other operators๐Ÿ”—

Combinations

Possible predecessors

train_class_mlpTrainClassMlp, read_class_mlpReadClassMlp

Alternatives

apply_dl_modelApplyDlModel, evaluate_class_mlpEvaluateClassMlp

See also

create_class_mlpCreateClassMlp

References๐Ÿ”—

Christopher M. Bishop: โ€œNeural Networks for Pattern Recognitionโ€; Oxford University Press, Oxford; 1995.

Andrew Webb: โ€œStatistical Pattern Recognitionโ€; Arnold, London; 1999.

Module๐Ÿ”—

Foundation