evaluate_class_gmmT_evaluate_class_gmmEvaluateClassGmmEvaluateClassGmmevaluate_class_gmm (算子名称)

名称

evaluate_class_gmmT_evaluate_class_gmmEvaluateClassGmmEvaluateClassGmmevaluate_class_gmm — Evaluate a feature vector by a Gaussian Mixture Model.

参数签名

evaluate_class_gmm( : : GMMHandle, 特征 : ClassProb, Density, KSigmaProb)

Herror T_evaluate_class_gmm(const Htuple GMMHandle, const Htuple 特征, Htuple* ClassProb, Htuple* Density, Htuple* KSigmaProb)

void EvaluateClassGmm(const HTuple& GMMHandle, const HTuple& 特征, HTuple* ClassProb, HTuple* Density, HTuple* KSigmaProb)

HTuple HClassGmm::EvaluateClassGmm(const HTuple& 特征, double* Density, double* KSigmaProb) const

static void HOperatorSet.EvaluateClassGmm(HTuple GMMHandle, HTuple 特征, out HTuple classProb, out HTuple density, out HTuple KSigmaProb)

HTuple HClassGmm.EvaluateClassGmm(HTuple 特征, out double density, out double KSigmaProb)

def evaluate_class_gmm(gmmhandle: HHandle, 特征: Sequence[float]) -> Tuple[Sequence[float], float, float]

描述

evaluate_class_gmmevaluate_class_gmmEvaluateClassGmmEvaluateClassGmmEvaluateClassGmmevaluate_class_gmm computes three different probability values for a feature vector 特征特征特征特征特征特征 with the Gaussian Mixture Model (GMM) GMMHandleGMMHandleGMMHandleGMMHandleGMMHandlegmmhandle.

The a-posteriori probability of class i for the sample 特征特征特征特征特征特征(x) is computed as and returned for each class in ClassProbClassProbClassProbClassProbclassProbclass_prob. The formulas for the calculation of the center density function p(x|j) are described with create_class_gmmcreate_class_gmmCreateClassGmmCreateClassGmmCreateClassGmmcreate_class_gmm.

The probability density of the feature vector is computed as a sum of the posterior class probabilities and is returned in DensityDensityDensityDensitydensitydensity. Here, Pr(i) are the prior classes probabilities as computed by train_class_gmmtrain_class_gmmTrainClassGmmTrainClassGmmTrainClassGmmtrain_class_gmm. DensityDensityDensityDensitydensitydensity can be used for novelty detection, i.e., to reject feature vectors that do not belong to any of the trained classes. However, since DensityDensityDensityDensitydensitydensity depends on the scaling of the feature vectors and since DensityDensityDensityDensitydensitydensity is a probability density, and consequently does not need to lie between 0 and 1, the novelty detection can typically be performed more easily with KSigmaProbKSigmaProbKSigmaProbKSigmaProbKSigmaProbksigma_prob (see below).

A k-sigma error ellipsoid is defined as a locus of points for which In the one dimensional case this is the interval . For any 1D Gaussian distribution, it is true that approximately 68% of the occurrences of the random variable are within this range for k=1, approximately 95% for k=2, approximately 99% for k=3, etc. This probability is called k-sigma probability and is denoted by P[k]. P[k] can be computed numerically for univariate as well as for multivariate Gaussian distributions, where it should be noted that for the same values of k, (here N and (N+1) denote dimensions). For Gaussian mixture models the k-sigma probability is computed as: where . are weighted with the class priors and then normalized. The maximum value of all classes is returned in KSigmaProbKSigmaProbKSigmaProbKSigmaProbKSigmaProbksigma_prob, such that

KSigmaProbKSigmaProbKSigmaProbKSigmaProbKSigmaProbksigma_prob can be used for novelty detection, as it indicates how well a feature vector fits into the distribution of the class it is assigned to. Typically, feature vectors having values below 0.0001 should be rejected. Note that the rejection threshold defined by the parameter RejectionThresholdRejectionThresholdRejectionThresholdRejectionThresholdrejectionThresholdrejection_threshold in classify_image_class_gmmclassify_image_class_gmmClassifyImageClassGmmClassifyImageClassGmmClassifyImageClassGmmclassify_image_class_gmm refers to the KSigmaProbKSigmaProbKSigmaProbKSigmaProbKSigmaProbksigma_prob values.

Before calling evaluate_class_gmmevaluate_class_gmmEvaluateClassGmmEvaluateClassGmmEvaluateClassGmmevaluate_class_gmm, the GMM must be trained with train_class_gmmtrain_class_gmmTrainClassGmmTrainClassGmmTrainClassGmmtrain_class_gmm.

The position of the maximum value of ClassProbClassProbClassProbClassProbclassProbclass_prob is usually interpreted as the class of the feature vector and the corresponding value as the probability of the class. In this case, classify_class_gmmclassify_class_gmmClassifyClassGmmClassifyClassGmmClassifyClassGmmclassify_class_gmm should be used instead of evaluate_class_gmmevaluate_class_gmmEvaluateClassGmmEvaluateClassGmmEvaluateClassGmmevaluate_class_gmm, because classify_class_gmmclassify_class_gmmClassifyClassGmmClassifyClassGmmClassifyClassGmmclassify_class_gmm directly returns the class and corresponding probability.

运行信息

参数表

GMMHandleGMMHandleGMMHandleGMMHandleGMMHandlegmmhandle (input_control)  class_gmm HClassGmm, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

GMM handle.

特征特征特征特征特征特征 (input_control)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Feature vector.

ClassProbClassProbClassProbClassProbclassProbclass_prob (output_control)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

A-posteriori probability of the classes.

DensityDensityDensityDensitydensitydensity (output_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Probability density of the feature vector.

KSigmaProbKSigmaProbKSigmaProbKSigmaProbKSigmaProbksigma_prob (output_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Normalized k-sigma-probability for the feature vector.

结果

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

可能的前置算子

train_class_gmmtrain_class_gmmTrainClassGmmTrainClassGmmTrainClassGmmtrain_class_gmm, read_class_gmmread_class_gmmReadClassGmmReadClassGmmReadClassGmmread_class_gmm

可替代算子

classify_class_gmmclassify_class_gmmClassifyClassGmmClassifyClassGmmClassifyClassGmmclassify_class_gmm

参考其它

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.

模块

Foundation