Reference:
Pattern recognition, by Sergios Theodoridis, Konstantinos Koutroumbas (2009)
Slides of CS4220, TUD
Content
The Peaking Phenomenon (5.3)
More features ⟹ ? \stackrel{?}{\Longrightarrow} ⟹? Better performance
- If the corresponding PDFs are known, the Bayesian error goes down with more features. We can perfectly discriminate the two classes by arbitrarily increasing the number of features.
- If the PDFs are unknown and the associated parameters must be estimated using a finite training set, then we must try to keep the number of features to a relatively low number.
In practice, for a finite N N N, by increasing the number of features one obtains an initial improvement in performance, but after a critical value further increase of the number of features results in an increase of the probability of error. This phenomenon is also known as the peaking phenomenon.
What feature subset to keep? ⟹ \Longrightarrow ⟹ Feature selection / extraction
- Feature selection: select d d d out of p p p measurements
- Feature extraction: map p p p measurements to d d d measurements
What do we need?
- Criterion functions, e.g., error, class overlap, information loss…
- Optimization or “search” algorithms to find mapping for given criterion
Class Separability Measures (5.6)
Divergence
Let us recall our familiar Bayes rule. Given two classes ω 1 \omega_1 ω1 and ω 2 \omega_2 ω2 and a feature vector x \mathbf x x, we select ω 1 \omega _1 ω1 if
P ( ω 1 ∣ x ) > P ( ω 2 ∣ x ) P(\omega_1|\mathbf x)>P(\omega_2|\mathbf x) P(ω1∣x)>P(ω2∣x)
The classification error probability depends on the difference between P ( ω 1 ∣ x ) P(\omega_1|\mathbf x) P(ω1∣x) and P ( ω 2 ∣ x ) P(\omega_2|\mathbf x) P(ω2∣x), hence the ratio P ( ω 1 ∣ x ) / P ( ω 2 ∣ x ) P(\omega_1|\mathbf x)/P(\omega_2|\mathbf x) P(ω1∣x)/P(ω2∣x) can convey useful information concerning the discriminatory capabilities associated with an adopted feature vector x \mathbf x x. Alternatively, the same information resides in the ratio
ln p ( x ∣ ω 1 ) p ( x ∣ ω 2 ) ≡ D 12 ( x ) \ln \frac{p(\mathbf x|\omega_1)}{p(\mathbf x|\omega_2)}\equiv D_{12}(\mathbf x) lnp(x∣ω2)p(x∣ω1)≡D12(x)
Since x \mathbf x x takes different values, it is natural to consider the mean value over class ω 1 \omega_1 ω1 (because x \mathbf x x is classified to class ω 1 \omega_1 ω1), that is
D 12 = ∫ − ∞ + ∞ p ( x ∣ ω 1 ) ln p ( x ∣ ω 1 ) p ( x ∣ ω 2 ) d x (DV.1) D_{12}=\int_{-\infty}^{+\infty} p(\mathbf x|\omega_1)\ln \frac{p(\mathbf x|\omega_1)}{p(\mathbf x|\omega_2)}d\mathbf x\tag{DV.1} D12=∫−∞+∞p(x∣ω1)lnp(x∣ω2)p(x∣ω1)dx(DV.1)
Similar arguments hold for class ω 2 \omega_2 ω2, and we define
D 21 = ∫ − ∞ + ∞ p ( x ∣ ω 2 ) ln p ( x ∣ ω 2 ) p ( x ∣ ω 1 ) d x (DV.2) D_{21}=\int_{-\infty}^{+\infty} p(\mathbf x|\omega_2)\ln \frac{p(\mathbf x|\omega_2)}{p(\mathbf x|\omega_1)}d\mathbf x\tag{DV.2} D21=∫−∞+∞p(x∣ω2)lnp(x∣ω1)p(x∣ω2)dx(DV.2)
The sum
d 12 = D 12 + D 21 (DV.3) d_{12}=D_{12}+D_{21}\tag{DV.3} d12=D12+D21(DV.3)
is known as the divergence and can be used as a separability measure for the classes ω 1 , ω 2 \omega_1,\omega _2 ω1,ω2, with respect to the adopted feature vector x \mathbf x x.
For a multiclass problem, the divergence is computed for every class pair ω i , ω j \omega_i,\omega_j ωi,ωj
d i j = D i j + D j i = ∫ − ∞ + ∞ [ p ( x ∣ ω i ) − p ( x ∣ ω j ) ] ln p ( x ∣ ω i ) p ( x ∣ ω j ) d x (DV.4) d_{ij}=D_{ij}+D_{ji}=\int_{-\infty}^{+\infty}[p(\mathbf x|\omega_i)-p(\mathbf x|\omega_j)]\ln \frac{p(\mathbf x|\omega_i)}{p(\mathbf x|\omega_j)}d\mathbf x \tag{DV.4} dij=Dij+Dji=∫−∞+∞[p(x∣ωi)−p(x∣ωj)]lnp(x∣ωj)p(x∣ωi)dx(DV.4)
and the average class separability can be computed using the average divergence
d = ∑ i = 1 M ∑ j = 1 M P ( ω i ) P ( ω j ) d i j (DV.5) d=\sum_{i=1}^M\sum_{j=1}^MP(\omega_i)P(\omega_j)d_{ij}\tag{DV.5} d=i=1∑Mj=1∑MP(ωi)P(ωj)dij(DV.5)
If the components of the feature vector are statistically independent, then it can be shown that
d i j ( x 1 , x 2 , ⋯ , x l ) = ∫ − ∞ + ∞ [ p ( x ∣ ω i ) − p ( x ∣ ω j ) ] ∑ r = 1 l ln p ( x r ∣ ω i ) p ( x r ∣ ω j ) d x = a ∑ r = 1 l ∫ − ∞ + ∞ [ p ( x r ∣ ω i ) − p ( x r ∣ ω j ) ] ln p ( x r ∣ ω i ) p ( x r ∣ ω j ) d x r = ∑ r = 1 l d i j ( x r ) (DV.6) \begin{aligned} d_{ij}(x_1,x_2,\cdots,x_l)&=\int_{-\infty}^{+\infty}[p(\mathbf x|\omega_i)-p(\mathbf x|\omega_j)]\sum_{r=1}^{l}\ln \frac{p(x_r|\omega_i)}{p(x_r|\omega_j)}d\mathbf x \\ &\stackrel{a}{=}\sum_{r=1}^{l}\int_{-\infty}^{+\infty}[p(x_r|\omega_i)-p(x_r|\omega_j)]\ln \frac{p(x_r|\omega_i)}{p(x_r|\omega_j)}dx_r\\ &=\sum_{r=1}^{l}d_{ij}(x_r) \end{aligned}\tag{DV.6} dij(x1,x2,⋯,xl)=∫−∞+∞[p(x∣ωi)−p(x∣ωj)]r=1∑llnp(xr∣ωj)p(xr∣ωi)dx=ar=1∑l∫−∞+∞[p(xr∣ωi)−p(xr∣ωj)]lnp(xr∣ωj)p(xr∣ωi)dxr=r=1∑ldij(xr)(DV.6)
where = a \stackrel{a}{=} =a is due to
∫ − ∞ + ∞ ⋯ ∫ − ∞ + ∞ p ( x ∣ ω i ) − p ( x ∣ ω j ) d x 1 ⋯ d x r − 1 d x r + 1 ⋯ d x l = p ( x r ∣ ω i ) − p ( x r ∣ ω j ) \int_{-\infty}^{+\infty}\cdots\int_{-\infty}^{+\infty}p(\mathbf x|\omega_i)-p(\mathbf x|\omega_j)dx_1\cdots dx_{r-1}dx_{r+1}\cdots dx_l=p(x_r|\omega_i)-p(x_r|\omega_j) ∫−∞+∞⋯∫−∞+∞p(x∣ωi)−p(x∣ωj)dx1⋯dxr−1dxr+1⋯dxl=p(xr∣ωi)−p(xr∣ωj)
Assuming now that the density functions are Gaussians N ( μ i , Σ i ) \mathcal N(\boldsymbol \mu_i,\boldsymbol \Sigma_i) N(μi,Σi) and N ( μ j , Σ j ) \mathcal N(\boldsymbol \mu_j,\boldsymbol \Sigma_j) N(μj,Σj), respectively, the computation of the divergence is simplified, and it is not difficult to show that
d i j = 1 2 t r a c e { Σ i − 1 Σ j + Σ j − 1 Σ i − 2 I } + 1 2 ( μ i − μ j ) T ( Σ i − 1 + Σ j − 1 ) ( μ i − μ j ) (DV.7) d_{ij}=\frac{1}{2}\mathrm{trace}\{\boldsymbol \Sigma_i^{-1}\boldsymbol \Sigma_j+\boldsymbol \Sigma_j^{-1}\boldsymbol \Sigma_i-2I \}+\frac{1}{2}(\boldsymbol \mu_i-\boldsymbol \mu_j)^T(\boldsymbol \Sigma_i^{-1}+\boldsymbol \Sigma_j^{-1})(\boldsymbol \mu_i-\boldsymbol \mu_j)\tag{DV.7} dij=21trace{
Σi−1Σj+Σj−1Σi−2I}+21(μi−μj)T(Σi−1+Σj−1)(μi−μj)(DV.7)
It can be seen that a class separability measure cannot depend only on the difference of the mean values; it must also be variance dependent. If the covariance matrices of the two Gaussian distributions are equal, then the divergence is further simplified to
d i j = ( μ i − μ j ) T Σ − 1 ( μ i − μ j ) d_{ij}=(\boldsymbol \mu_i-\boldsymbol \mu_j)^T\boldsymbol \Sigma^{-1}(\boldsymbol \mu_i-\boldsymbol \mu_j) dij=(μi−μj)TΣ−1(μi−μj)
which is nothing other than the Mahalanobis distance between the corresponding mean vectors. This has a direct relation with the Bayes error, which is a desirable property for class separation measures.
Chernoff Bound and Bhattacharyya Distance
The minimum attainable classification error of the Bayes classifier for two classes ω 1 , ω 2 \omega_1,\omega_2 ω1