[chinese][all] If we assume that data entries in the same class of the training set are generated by a probability density function (PDF), we can use the concept of MLE (maximum likelihood estimate) to identify the parameters of the PDF. These PDFs (with each PDF for a class) can then be used to construct a classifier which can evaluate the likelihood for a data point being in a class. One of the commonly used PDFs is the d-dimensional Gaussian (normal) distribution:

g( The resulting classifier is often called thex,m, S) = [(2p)^{d}*|S|]^{-0.5}*exp[-(x-m)^{T}S^{-1}(x-m)/2]quadratic classifier(QC) since the decision boundary between any two classes is a quadratic functions in the feature space. In contrast to the commonly used Gaussian mixture models (GMM for short), the quadratic classifier uses only one Gaussian distribution for each class.The approach of the quadratic classifier can be summarized as follows:

- Assume that data in class
iis governed by a d-dimensional Gaussian probability density function:g( wherex, m_{i}, S_{i}) = [(2p)^{d}*|S_{i}|]^{-0.5}*exp[-(x-m_{i})^{T}S_{i}^{-1}(x-m_{i})/2]m_{i}is the mean vector and S_{i}is the covariance matrix of this PDF, and |S_{i}| is the determinant of S_{i}. Given the training data {x_{1},x_{2}, ...x_{n}} in class i, the optimum parameters in the sense of maximum likelihood can be expressed as follows:m_{i}= (x_{1}+x_{2}+...+x_{n})/nS _{i}= [ (x_{1}-m_{i})(x_{1}-m_{i})^{T}+ (x_{2}-m_{i})(x_{2}-m_{i})^{T}+ ... + (x_{n}-m_{i})(x_{n}-m_{i})^{T}] /(n-1)- Since the Gaussian PDF does not reflect the prior probability of class i (denoted by p(c
_{i})), we usually use p(c_{i})g(x,m_{i}, S_{i}) to represent the probability density of a given vectorx. In practice, p(c_{i}) is computed as the number of entries of class i divided by the number of total entries in the training set.- In application, for a given vector
xof unknown class, the higher the probability density p(c_{i})g(x,m_{i}, S_{i}) is, the more likelihood that this vector belongs to class i.When implementing the classifier, usually we do not calculate p(c

_{i})g(x,m_{i}, S_{i}) directly since the exponential function is likely to introduce round-off errors. Instead, we compute the natural logarithm of the probability density, as follows:log[p(c The decision boundary between class_{i})g(x,m_{i}, S_{i})] = log(p(c_{i})) - (d*log(2p) + log|S_{i}|)/2 - (x-m_{i})^{T}S_{i}^{-1}(x-m_{i})/2iandjis represented by the following trajectory:p(c Taking the logrithm of both sides, we have_{i})g(x,m_{i}, S_{i}) = p(c_{j})g(x,m_{j}, S_{j}).log(p(c After simplification, we have the decision boundary as the following equation:_{i})) - (d*log(2p) + log|S_{i}|)/2 - (x-m_{i})^{T}S_{i}^{-1}(x-m_{i})/2 = log(p(c_{j})) - (d*log(2p) + log|S|_{j})/2 - (x-m_{j})^{T}S_{j}^{-1}(x-m_{j})/2( where the right-hand side is a constant. Since both (x-m_{j})^{T}S_{j}^{-1}(x-m_{j}) - (x-m_{i})^{T}S_{i}^{-1}(x-m_{i}) = log{[|S|_{i}p^{2}(c_{i})]/[|S|_{j}p^{2}(c_{j})]}x-m_{j})^{T}S_{j}^{-1}(x-m_{j}) and (x-m_{i})^{T}S_{i}^{-1}(x-m_{i}) are quadratic, the above equation represents a decision boundary of the quadratic form in the d-dimensional feature space.In the following example, we shall use dimensions 3 and 4 of the Iris dataset for the quadratic classifier. First of all, we can plot the data distribution:

Then we can use "qcTrain" for constructing a QC for classification:

So for such a inside test, the recognition rate of QC is 98% using only features 3 and 4.

In the above example, each misclassified data point is labeled with a cross. Moreover, we use the number of entries of each class as the class prior probability for computing the probability density. In general, there are two ways to specify class prior probabilities:

- Use the number of entries in each class as the prior probabilities. You can divide the total number of entries in the training set to have a real probability between 0 and 1. In practice, the division does not change the classification results since it is applied to every class' PDF. (You can use the function classDataCount.m to find the number of entries in each class.)
- If we have the domain knowledge of the prior probabilities, we can assign them directly.
For the above example, we can go one step further to plot the Gaussian PDFs as 3D surfaces and display the corresponding contours, as follows:

Based on the computed PDF for each class, we can plot the decision boundaries, as follows:

As we have derived earlier, the decision boundaries should be quadratic functions in the 2D plane. The above plots do verify this fact.

If the class prior probabilities vary a lot among different classes, we might get seemingly wrong result by using the quadratic classifier. This problem is explored in the exercise.

We can also set the class prior probabilities according to the cost associated with false-positive and false-negative cases. This will be explained later.

If the data distribution is too complicated to model using a single Gaussian PDF for each class, then we have other choices such as multiple Gaussian classifiers or Gaussian mixture models, to be detailed later.

Data Clustering and Pattern Recognition (¸ê®Æ¤À¸s»P¼Ë¦¡¿ë»{)