classify_class_gmmT_classify_class_gmmClassifyClassGmmClassifyClassGmmclassify_class_gmm (Operator)
Name
classify_class_gmmT_classify_class_gmmClassifyClassGmmClassifyClassGmmclassify_class_gmm
— Calculate the class of a feature vector by a Gaussian Mixture
Model.
Signature
void ClassifyClassGmm(const HTuple& GMMHandle, const HTuple& Features, const HTuple& Num, HTuple* ClassID, HTuple* ClassProb, HTuple* Density, HTuple* KSigmaProb)
HTuple HClassGmm::ClassifyClassGmm(const HTuple& Features, Hlong Num, HTuple* ClassProb, HTuple* Density, HTuple* KSigmaProb) const
static void HOperatorSet.ClassifyClassGmm(HTuple GMMHandle, HTuple features, HTuple num, out HTuple classID, out HTuple classProb, out HTuple density, out HTuple KSigmaProb)
HTuple HClassGmm.ClassifyClassGmm(HTuple features, int num, out HTuple classProb, out HTuple density, out HTuple KSigmaProb)
def classify_class_gmm(gmmhandle: HHandle, features: Sequence[float], num: int) -> Tuple[Sequence[int], Sequence[float], Sequence[float], Sequence[float]]
def classify_class_gmm_s(gmmhandle: HHandle, features: Sequence[float], num: int) -> Tuple[int, Sequence[float], Sequence[float], Sequence[float]]
Description
classify_class_gmmclassify_class_gmmClassifyClassGmmClassifyClassGmmClassifyClassGmmclassify_class_gmm
computes the best NumNumNumNumnumnum
classes of
the feature vector FeaturesFeaturesFeaturesFeaturesfeaturesfeatures
with the Gaussian Mixture Model
(GMM) GMMHandleGMMHandleGMMHandleGMMHandleGMMHandlegmmhandle
and returns the classes in ClassIDClassIDClassIDClassIDclassIDclass_id
and the corresponding probabilities of the classes in
ClassProbClassProbClassProbClassProbclassProbclass_prob
. Before calling classify_class_gmmclassify_class_gmmClassifyClassGmmClassifyClassGmmClassifyClassGmmclassify_class_gmm
, the
GMM must be trained with train_class_gmmtrain_class_gmmTrainClassGmmTrainClassGmmTrainClassGmmtrain_class_gmm
.
classify_class_gmmclassify_class_gmmClassifyClassGmmClassifyClassGmmClassifyClassGmmclassify_class_gmm
corresponds to a call to
evaluate_class_gmmevaluate_class_gmmEvaluateClassGmmEvaluateClassGmmEvaluateClassGmmevaluate_class_gmm
and an additional step that extracts the
best NumNumNumNumnumnum
classes. As described with
evaluate_class_gmmevaluate_class_gmmEvaluateClassGmmEvaluateClassGmmEvaluateClassGmmevaluate_class_gmm
, the output values of the GMM can be
interpreted as probabilities of the occurrence of the respective
classes. However, here the posterior probability ClassProbClassProbClassProbClassProbclassProbclass_prob
is further normalized as ClassProbClassProbClassProbClassProbclassProbclass_prob
= p(i|x)/p(x)
, where p(i|x) and p(x) are specified with evaluate_class_gmmevaluate_class_gmmEvaluateClassGmmEvaluateClassGmmEvaluateClassGmmevaluate_class_gmm
.
In most cases it should be sufficient to use NumNumNumNumnumnum
=
1 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 (NumNumNumNumnumnum
= 2), particularly if it can be
expected that the classes show a significant degree of overlap.
DensityDensityDensityDensitydensitydensity
and KSigmaProbKSigmaProbKSigmaProbKSigmaProbKSigmaProbksigma_prob
are explained with
evaluate_class_gmmevaluate_class_gmmEvaluateClassGmmEvaluateClassGmmEvaluateClassGmmevaluate_class_gmm
.
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
GMMHandleGMMHandleGMMHandleGMMHandleGMMHandlegmmhandle
(input_control) class_gmm →
HClassGmm, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
GMM handle.
FeaturesFeaturesFeaturesFeaturesfeaturesfeatures
(input_control) real-array →
HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Feature vector.
NumNumNumNumnumnum
(input_control) integer →
HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of best classes to determine.
Default:
1
Suggested values:
1, 2, 3, 4, 5
ClassIDClassIDClassIDClassIDclassIDclass_id
(output_control) integer(-array) →
HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Result of classifying the feature vector with
the GMM.
ClassProbClassProbClassProbClassProbclassProbclass_prob
(output_control) real-array →
HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
A-posteriori probability of the classes.
DensityDensityDensityDensitydensitydensity
(output_control) real-array →
HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Probability density of the feature vector.
KSigmaProbKSigmaProbKSigmaProbKSigmaProbKSigmaProbksigma_prob
(output_control) real-array →
HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Normalized k-sigma-probability for the feature
vector.
Result
If the parameters are valid, the operator classify_class_gmmclassify_class_gmmClassifyClassGmmClassifyClassGmmClassifyClassGmmclassify_class_gmm
returns the value 2 (
H_MSG_TRUE)
. If necessary an exception is
raised.
Possible Predecessors
train_class_gmmtrain_class_gmmTrainClassGmmTrainClassGmmTrainClassGmmtrain_class_gmm
,
read_class_gmmread_class_gmmReadClassGmmReadClassGmmReadClassGmmread_class_gmm
Alternatives
evaluate_class_gmmevaluate_class_gmmEvaluateClassGmmEvaluateClassGmmEvaluateClassGmmevaluate_class_gmm
See also
create_class_gmmcreate_class_gmmCreateClassGmmCreateClassGmmCreateClassGmmcreate_class_gmm
References
Christopher M. Bishop: “Neural Networks for Pattern Recognition”;
Oxford University Press, Oxford; 1995.
Mario A.T. Figueiredo: “Unsupervised Learning of Finite Mixture
Models”; IEEE Transactions on Pattern Analysis and Machine
Intelligence, Vol. 24, No. 3; March 2002.
Module
Foundation