Solving the face recognition problem using QR factorization · LDA/range(Sb) [7,19] first...

10
Solving the face recognition problem using QR factorization JIANQIANG GAO(a,b) (a) Hohai University College of Computer and Information Engineering Jiangning District, 210098, Nanjing P.R. CHINA [email protected] LIYA FAN(b) (b) Liaocheng University School of Mathematical Sciences Hunan Road NO.1, 252059, Liaocheng P.R. CHINA [email protected] LIZHONG XU(a) (a) Hohai University College of Computer and Information Engineering Jiangning District, 210098, Nanjing P.R. CHINA [email protected] Abstract: Inspired and motivated by the idea of LDA/QR presented by Ye and Li, in addition, by the idea of WK- DA/QR and WKDA/SVD presented by Gao and Fan. In this paper, we first consider computational complexity and efficacious of algorithm present a PCA/range(S b ) algorithm for dimensionality reduction of data, which transforms firstly the original space by using a basis of range(S b ) and then in the transformed space applies PCA. Considering computationally expensive and time complexity, we further present an improved version of PCA/range(S b ), denot- ed by PCA/range(S b )-QR, in which QR decomposition is used at the last step of PCA/range(S b ). In addition, we also improve LDA/GSVD, LDA/range(S b ) and PCA by means of QR decomposition. Extensive experiments on face images from UCI data sets show the effectiveness of the proposed algorithms. Key–Words: QR decomposition, PCA/range(S b )-QR, PCA/GSVD-QR, LDA/range(S b )-QR, PCA/QR, Algorithm 1 Introduction Dimensionality reduction is important in many ap- plications of data mining, machine learning and face recognition [1-5]. Many methods have been proposed for dimensionality reduction, such as principal com- ponent analysis (PCA) [2,6-10] and linear discrimi- nant analysis (LDA) [2-4,11-15]. PCA is one of the most popular methods for dimensionality reduction in compression and recognition problem, which tries to find eigenvector of components of original data. L- DA aims to find an optimal transformation by mini- mizing the within-class distance and maximizing the between-class distance, simultaneously. The optimal transformation is readily computed by applying the eigen-decomposition to the scatter matrices. An in- trinsic limitation of classical LDA is that its objec- tive function requires one of the scatter matrices be- ing nonsingular. Classical LDA can not solve small size problems [16-18], in which the data dimension- ality is larger than the sample size and then all scatter matrices are singular. In recent years, many approaches have been pro- posed to deal with small size problems. We will re- view four important methods including PCA [2,6-10], LDA/range(S b ) [7,19], LDA/GSVD [19-21] and L- DA/QR [22-23]. The difference of these four meth- ods can be briefly described as follows: PCA tries to find eigenvectors of covariance matrix that corre- sponds to the direction of principal components of o- riginal data. It may discard some useful information. LDA/range(S b ) [7,19] first transforms the original s- pace by using a basis of range(S b ) and then in the transformed space the minimization of within-class scatter is pursued. The key idea of LDA/range(S b ) is to discard the null space of between-class scat- ter S b , which contains no useful information, rather than discarding the null space of within-class scatter S w , which contains the most discriminative informa- tion. LDA/GSVD is based on generalized singular value decomposition (GSVD) [17,20-21,24-26] and can deal with the singularity of S w . Howland et. al [27] established the equivalence between LDA/GSVD and a two-stage approach, in which the intermediate dimension after the first stage falls within a specific range and then LDA/GSVD is required for the sec- ond stage. Park et. al [19] presented an efficient al- gorithm for LDA/GSVD. Considering computational- ly expensive and time complexity, Ye and Li [22-23] presented a LDA/QR algorithm. LDA/QR is a two- stage method, the first stage maximizes the separation between different classes by applying QR decomposi- tion and the second stage incorporates both between- class and within-class information by applying LDA to the ”reduced” scatter matrices resulted from the first stage. Gao and Fan [32] presented WKDA/QR and WKDA/SVD algorithms which are used weight- ed function and kernel function by QR decomposition and singular value decomposition to solve small sam- ple size problem. WSEAS TRANSACTIONS on MATHEMATICS Jianqiang Gao, Liya Fan, Lizhong Xu E-ISSN: 2224-2880 712 Issue 8, Volume 11, August 2012

Transcript of Solving the face recognition problem using QR factorization · LDA/range(Sb) [7,19] first...

Page 1: Solving the face recognition problem using QR factorization · LDA/range(Sb) [7,19] first transforms the original s-pace by using a basis of range(Sb) and then in the ... widely

Solving the face recognition problem using QR factorization

JIANQIANG GAO(a,b)(a) Hohai University

College of Computer andInformation Engineering

Jiangning District, 210098, NanjingP.R. CHINA

[email protected]

LIYA FAN(b)(b) Liaocheng University

School of Mathematical SciencesHunan Road NO.1,252059, Liaocheng

P.R. [email protected]

LIZHONG XU(a)(a) Hohai University

College of Computer andInformation Engineering

Jiangning District, 210098, NanjingP.R. CHINA

[email protected]

Abstract: Inspired and motivated by the idea of LDA/QR presented by Ye and Li, in addition, by the idea of WK-DA/QR and WKDA/SVD presented by Gao and Fan. In this paper, we first consider computational complexity andefficacious of algorithm present a PCA/range(Sb) algorithm for dimensionality reduction of data, which transformsfirstly the original space by using a basis of range(Sb) and then in the transformed space applies PCA. Consideringcomputationally expensive and time complexity, we further present an improved version of PCA/range(Sb), denot-ed by PCA/range(Sb)-QR, in which QR decomposition is used at the last step of PCA/range(Sb). In addition, wealso improve LDA/GSVD, LDA/range(Sb) and PCA by means of QR decomposition. Extensive experiments onface images from UCI data sets show the effectiveness of the proposed algorithms.

Key–Words: QR decomposition, PCA/range(Sb)-QR, PCA/GSVD-QR, LDA/range(Sb)-QR, PCA/QR, Algorithm

1 Introduction

Dimensionality reduction is important in many ap-plications of data mining, machine learning and facerecognition [1-5]. Many methods have been proposedfor dimensionality reduction, such as principal com-ponent analysis (PCA) [2,6-10] and linear discrimi-nant analysis (LDA) [2-4,11-15]. PCA is one of themost popular methods for dimensionality reduction incompression and recognition problem, which tries tofind eigenvector of components of original data. L-DA aims to find an optimal transformation by mini-mizing the within-class distance and maximizing thebetween-class distance, simultaneously. The optimaltransformation is readily computed by applying theeigen-decomposition to the scatter matrices. An in-trinsic limitation of classical LDA is that its objec-tive function requires one of the scatter matrices be-ing nonsingular. Classical LDA can not solve smallsize problems [16-18], in which the data dimension-ality is larger than the sample size and then all scattermatrices are singular.

In recent years, many approaches have been pro-posed to deal with small size problems. We will re-view four important methods including PCA [2,6-10],LDA/range(Sb) [7,19], LDA/GSVD [19-21] and L-DA/QR [22-23]. The difference of these four meth-ods can be briefly described as follows: PCA triesto find eigenvectors of covariance matrix that corre-sponds to the direction of principal components of o-

riginal data. It may discard some useful information.LDA/range(Sb) [7,19] first transforms the original s-pace by using a basis of range(Sb) and then in thetransformed space the minimization of within-classscatter is pursued. The key idea of LDA/range(Sb)is to discard the null space of between-class scat-ter Sb, which contains no useful information, ratherthan discarding the null space of within-class scatterSw, which contains the most discriminative informa-tion. LDA/GSVD is based on generalized singularvalue decomposition (GSVD) [17,20-21,24-26] andcan deal with the singularity of Sw. Howland et. al[27] established the equivalence between LDA/GSVDand a two-stage approach, in which the intermediatedimension after the first stage falls within a specificrange and then LDA/GSVD is required for the sec-ond stage. Park et. al [19] presented an efficient al-gorithm for LDA/GSVD. Considering computational-ly expensive and time complexity, Ye and Li [22-23]presented a LDA/QR algorithm. LDA/QR is a two-stage method, the first stage maximizes the separationbetween different classes by applying QR decomposi-tion and the second stage incorporates both between-class and within-class information by applying LDAto the ”reduced” scatter matrices resulted from thefirst stage. Gao and Fan [32] presented WKDA/QRand WKDA/SVD algorithms which are used weight-ed function and kernel function by QR decompositionand singular value decomposition to solve small sam-ple size problem.

WSEAS TRANSACTIONS on MATHEMATICS Jianqiang Gao, Liya Fan, Lizhong Xu

E-ISSN: 2224-2880 712 Issue 8, Volume 11, August 2012

Page 2: Solving the face recognition problem using QR factorization · LDA/range(Sb) [7,19] first transforms the original s-pace by using a basis of range(Sb) and then in the ... widely

In this paper, we first present an extension ofPCA by means of the range of Sb, denoted byPCA/range(Sb). Considering computationally ex-pensive and time complexity, we also study an im-proved version of PCA/range(Sb), in which QR de-composition is used at the last step of PCA. Wedenote the improved version by PCA/range(Sb)-QR. In addition, we will improve LDA/GSVD,LDA/range(Sb) and PCA with QR decompositionand obtain LDA/GSVD-QR, LDA/range(Sb)-QR-1,LDA/range(Sb)-QR-2, PCA/QR-1 and PCA/QR-2.The effectiveness of the presented methods is com-pared by large number of experiments with knownORL database and Yale database.

The rest of this paper is organized as follows. Thereview of previous approaches are briefly introducedand discussed in Section 2. The detailed description-s about improvement of algorithms are presented inSection 3. In Section 4, Experiments and analysis arereported. Section 5 concludes the paper.

2 Review of previous approachesIn this section, we first introduce some importan-

t notations used in this paper. Given a data matrixA = [a1, · · · , aN ] ∈ Rn×N , where a1, · · · , aN ∈ Rn

are samples. We consider finding a linear transforma-tion G ∈ Rn×l that maps each ai to yi ∈ Rl withyi = GTai. Assume that the original data in A is par-titioned into k classes as A = [A1, · · · , Ak], whereAi ∈ Rn×Ni contains data points of the ith class and∑k

i=1Ni = N . In discriminant analysis, within-class,between-class and total scatter matrices are defined asfollows [3]:

Sb =1N

∑ki=1Ni(mi −m)(mi −m)T ,

Sw = 1N

∑ki=1

∑a∈Ai

(a−mi)(a−mi)T ,

St =1N

∑Ni=1(ai −m)(ai −m)T ,

(1)

where mi = 1Ni

∑a∈Ai

a is the centroid of the ith

class and m = 1N

∑Nj=1 aj is the global centroid of

the training data set. If we assume

Hb =1√N[√N1(m1 −m), · · · ,

√Nk(mk −m)],

Hw = 1√N[A1 −m1e

T1 , · · · , Ak −mke

Tk ],

Ht =1√N[a1 −m, · · · , aN −m] = 1√

N(A−meT ),

(2)then Sb = HbH

Tb , Sw = HwH

Tw and St =

HtHTt , where ei = (1, · · · , 1)T ∈ RNi and e =

(1, · · · , 1)T ∈ RN . For convenience, we list thesenotations in Table 1.

Table 1: Notation DescriptionNotation Description

A data matrixN number of training data pointsk number of classesHb precursor of between-class scatterHw precursor of within-class scatterHt precursor of total scatterSb between-class scatter matrixSw within-class scatter matrixSt total scatter matrix or covariance matrixn number of dimensionG transformation matrixl number of retained dimensionsAi data matrix of the i-th classmi centroid of the i-th classNi number of data points in the i-th classm global centroid of the training data setK number of nearest neighbors in KNN

2.1. Principal component analysis (PCA)PCA is a classical feature extraction method

widely used in the area of face recognition to reducethe dimensionality. The goal of PCA is to find eigen-vectors of the covariance matrix St, which correspondto the directions of the principal components of the o-riginal data. However, these eigenvectors may elim-inate some discriminative information for classifica-tion.

Algorithm 1: PCAInput : Data matrix A ∈ Rn×N

Output : Reduced data matrix AL

1. Compute Ht ∈ Rn×N according to (2);2. St ← HtH

Tt ;

3. Compute W from the EVD of St:St =WΣWT ;

4. Assign the first p columns of W to G,where p=rank(St);

5. AL = GTA.

2.2. Classical LDAClassical LDA aims to find the optimal trans-

formation G such that the class structure of the o-riginal high-dimensional space is preserved in thelow-dimensional space. From (1), we can eas-ily show that St = Sb + Sw and see thattrace(Sb) = 1

N

∑ki=1Ni∥mi −m∥22 and trace(Sw) =

1N

∑ki=1

∑x∈Ai

∥x −mi∥22 measure the closeness ofthe vectors within the classes and the separation be-tween the classes, respectively.

In the low-dimensional space resulted from thelinear transformation G, the within-class, between-class and total scatter matrices become SL

b =

GTSbG,SLw = GTSwG and SL

t = GTStG, respec-tively. An optimal transformation G would maximize

WSEAS TRANSACTIONS on MATHEMATICS Jianqiang Gao, Liya Fan, Lizhong Xu

E-ISSN: 2224-2880 713 Issue 8, Volume 11, August 2012

Page 3: Solving the face recognition problem using QR factorization · LDA/range(Sb) [7,19] first transforms the original s-pace by using a basis of range(Sb) and then in the ... widely

traceSLb and minimize traceSL

w. Common optimiza-tions in classical LDA include (see [3,20]):

maxG

trace{(SLw)

−1SLb } and

minG

trace{(SLb )

−1SLw}.

(3)

The optimization problems in (3) are equivalent tofinding the generalized eigenvectors satisfying Sbx =λSwx with λ = 0. The solution can be obtainedby applying the eigen-decomposition to the matrixS−1w Sb if Sw is nonsingular or S−1

b Sw if Sb is nonsin-gular. It was shown in [3,20] that the solution can al-so be obtained by computing the eigen-decompositionon the matrix S−1

t Sb if St is nonsingular. There areat most k − 1 eigenvectors corresponding to nonzeroeigenvalues since the rank of the matrix Sb is bound-ed from above by k − 1. Therefore, the number ofretained dimensions in classical LDA is at most k−1.A stable way to compute the eigen-decomposition isto apply SVD on the scatter matrices. Details can befound in [11].2.3. LDA/range(Sb)

In this subsection, we recall a two-step approachproposed by Yu and Yang [7] to handle small sizeproblems. This method first transforms the originalspace by using a basis of range(Sb) and then in thetransformed space the minimization of within-class s-catter is pursued. An optimal transformation G wouldmaximize traceSL

b and minimize traceSLw. Common

optimization in LDA/range(Sb) is (see [19]):

minG

trace{(SLb )

−1SLw}. (4)

The problem (4) is equivalent to finding the general-ized eigenvectors satisfying Sbx = λSwx with λ = 0.The solution can be obtained by applying the eigen-decomposition to the matrix S−1

b Sw if Sb is nonsin-gular. If Sb is singular, consider EVD of Sb:

Sb = UbΣbUTb =

[Ub1 Ub2

] [ Σb1 00 0

] [UTb1

UTb2

],

(5)where Ub is orthogonal, Ub1 ∈ Rn×q, rank(Sb) = qand Σb1 ∈ Rq×q is a diagonal matrix with non-increasing positive diagonal components. We canshow that range(Sb)=span(Ub1) and Σ

−1/2b1 UT

b1SbUb1

Σ−1/2b1 = Iq. Let Sb = Σ

−1/2b1 UT

b1SbUb1Σ−1/2b1 =

Iq, Sw = Σ−1/2b1 UT

b1SwUb1Σ−1/2b1 and St =

Σ−1/2b1 UT

b1StUb1Σ−1/2b1 . Consider the EVD of Sw :

Sw = UwΣwUTw , where Uw ∈ Rq×q is orthogonal

and Σw ∈ Rq×q is a diagonal matrix. It is evident that

UTwΣ

−1/2b1 UT

b1SbUb1Σ−1/2b1 Uw = Iq,

UTwΣ

−1/2b1 UT

b1SwUb1Σ−1/2b1 Uw = Σw.

(6)

In most applications, rank(Sw) is greater thanrank(Sb) and Σw is nonsingular. From (6), it followsthat

(Σ−1/2w UT

wΣ−1/2b1 UT

b1)Sb(Ub1Σ−1/2b1 UwΣ

−1/2w ) = Σ−1

w ,

(Σ−1/2w UT

wΣ−1/2b1 UT

b1)Sw(Ub1Σ−1/2b1 UwΣ

−1/2w ) = Iq.

The optimal transformation matrix proposed in [7] isG = Ub1Σ

−1/2b1 UwΣ

−1/2w and the algorithm as fol-

lows:

Algorithm 2: LDA/range(Sb)Input : Data matrix A ∈ Rn×N

Output : Reduced data matrix AL

1. Compute Hb ∈ Rn×k andHw ∈ Rn×N according to (2);

2. Sb ← HbHTb , Sw ← HwH

Tw

3. Compute the EVD of Sb :

Sb =[Ub1 Ub2

] [ Σb1 00 0

][UTb1

UTb2

];

4. Compute the EVD of Sw

Sw = Σ−1/2b1 UT

b1SwUb1∑−1/2

b1 :

Sw = UwΣwUTw ;

5. Assign Ub1Σ−1/2b1 UwΣ

−1/2w to G;

6. AL = GTA.

2.4. LDA/GSVDA recent work on overcoming singularity prob-

lem in LDA is the use of generalized singular valuedecomposition (GSVD) [17,20-21,24-26]. The cor-responding algorithm is named LDA/GSVD. It com-putes the solution exactly because the inversion of thematrix Sw can be avoided. An optimal transformationG obtained by LDA/GSVD would maximize traceSL

b

and minimize traceSLw. Common optimization is (see

[19,21]):

maxG

trace{(SLw)

−1SLb }. (7)

The solution of the problem (7) can be obtained by ap-plying the eigen-decomposition to the matrix S−1

w Sbif Sw is nonsingular. If Sw is singular, we have thefollowing efficient algorithm (see [19]):

Algorithm 3: An efficient method for LDA/GSVDInput : Data matrix A ∈ Rn×N

Output : Reduced data matrix AL

1. Compute Hb ∈ Rn×k andHt ∈ Rn×N according to (2);

2. Sb ← HbHTb , St ← HtH

Tt ;

WSEAS TRANSACTIONS on MATHEMATICS Jianqiang Gao, Liya Fan, Lizhong Xu

E-ISSN: 2224-2880 714 Issue 8, Volume 11, August 2012

Page 4: Solving the face recognition problem using QR factorization · LDA/range(Sb) [7,19] first transforms the original s-pace by using a basis of range(Sb) and then in the ... widely

3. Compute the EVD of St:

St =[Ut1 Ut2

] [ Σt1 00 0

][UTt1

UTt2

];

4. Compute the EVD of Sb;Sb =

∑−1/2t1 UT

t1SbUt1Σ−1/2t1 :

Sb = UbΣbUTb ;

5. Assign the first k − 1 columns ofUb as Ub1;

6. G← Ut1∑−1/2

t1 Ub1;7. AL = GTA.

2.5. LDA/QRYe and Li [22-23] presented a novel LDA imple-

mentation method, namely LDA/QR. LDA/QR con-tains two stages, the first stage is to maximize sepa-rability between different classes and thus has similartarget as OCM [28], the second stage incorporates thewithin-class scatter information by applying a relax-ation scheme to W .

Specifically, we would like to find a projectionmatrix G such that G = QW for any matrix W ∈Rk×k. This means that the problem of finding Gis equivalent to computing W . Due to GTSbG =W T (QTSbQ)W and GTSwG = W T (QTSwQ)W ,we have the following optimization problem:

W = argmaxW

trace(W T SbW )−1(W T SwW ),

whereSb = QTSbQ and Sw = QTSwQ. An efficientalgorithm for LDA/QR can be found in [22-23]:

Algorithm 4: LDA/QRInput : Data matrix A ∈ Rn×N

Output : Reduced data matrix AL

1. Compute Hb ∈ Rn×k andHt ∈ Rn×N according to (2);

2. Apply QR decomposition to Hb asHb = QR, where Q ∈ Rn×p,R ∈ Rp×k, and p=rank(Hb);

3. Sb ← RRT ;4. Sw ← QTHwH

TwQ;

5. Compute W from the EVD ofS−1b Sw with the corresponding

eigenvalues sorted innondecreasing order;

6. G← QW , where W = [W1, · · · ,Wq] and q=rank(Sw);

7. AL = GTA.

3 Improvement of algorithms3.1. PCA/range(Sb)

In this subsection, we will present a new method,namely PCA/range(Sb), to handle small size problem-s. This method first transforms the original space byusing a basis of range(Sb) and then in the transformedspace applies PCA. Similar 2.3, we first consider theEVD (5) of Sb and let Sb = Σ

−1/2b1 UT

b1SbUb1Σ−1/2b1 =

Iq, Sw = Σ−1/2b1 UT

b1SwUb1Σ−1/2b1 and St =

Σ−1/2b1 UT

b1StUb1Σ−1/2b1 . Then, we consider the EVD

of St : St = UtΣtUTt , where Ut ∈ Rq×q is orthog-

onal and Σt ∈ Rq×q is a diagonal matrix, and get anoptimal transformation matrix G = Ub1Σ

−1/2b1 Ut. An

efficient algorithm for PCA/range(Sb) is listed as fol-lows:

Algorithm 5: PCA/range(Sb)Input : Data matrix A ∈ Rn×N

Output : Reduced data matrix AL

1. Compute Hb ∈ Rn×k and Ht ∈ Rn×N

according to (2), respectively;2. Sb ← HbH

Tb , St ← HtH

Tt ;

3. Compute the EVD of Sb

Sb =[Ub1 Ub2

] [ Σb1 00 0

] [UTb1

UTb2

];

4. Compute the EVD of St

St = Σ−1/2b1 UT

b1StUb1Σ−1/2b1 : St = UtΣtU

Tt ;

5. G← Ub1Σ−1/2b1 Ut;

6. AL = GTA.

3.2. PCA/range(Sb)-QR, PCA/QR-1 and PCA/QR-2In order to improve computationally expensive

and low effectively classification, we consider QR de-composition of matrices and introduce an extensionversion of PCA/range(Sb), namely PCA/range(Sb)-QR. This method is different from PCA/range(Sb) inthe second stage. Detailed steps see Algorithm 6:

Algorithm 6: PCA/range(Sb)-QRInput : Data matrix A ∈ Rn×N

Output : Reduced data matrix AL

1. Compute Hb ∈ Rn×k and Ht ∈ Rn×N

according to (2), respectively;2. Sb ← HbH

Tb , St ← HtH

Tt ;

3. Compute the EVD of Sb

Sb =[Ub1 Ub2

] [ Σb1 00 0

] [UTb1

UTb2

];

4. Compute the QR decomposition ofHt = UT

b1Ht : Ht = QtRt;5. G← Ub1Qt;6. AL = GTA.

WSEAS TRANSACTIONS on MATHEMATICS Jianqiang Gao, Liya Fan, Lizhong Xu

E-ISSN: 2224-2880 715 Issue 8, Volume 11, August 2012

Page 5: Solving the face recognition problem using QR factorization · LDA/range(Sb) [7,19] first transforms the original s-pace by using a basis of range(Sb) and then in the ... widely

If the EVD of St in Algorithm 1 is replaced by theQR decomposition of Ht, we can obtain two improveversions of PCA, namely PCA/QR-1 and PCA/QR-2.

Algorithm 7: PCA/QR-1Input : Data matrix A ∈ Rn×N

Output : Reduced data matrix AL

1. Compute Ht ∈ Rn×N according to (2);2. Compute W from the QR

decomposition of Ht;3. Assign the first p columns of W to G

where p=rank(St);4. AL = GTA.

Algorithm 8: PCA/QR-2Input : Data matrix A ∈ Rn×N

Output : Reduced data matrix AL

1. Compute Ht ∈ Rn×N according to (2);2. Compute W from the QR

decomposition of Ht;3. Assign the first q columns of W to G

where q=rank(Sb);4. AL = GTA.

3.3. LDA/range(Sb)-QR-1, LDA/range(Sb)-QR-2,and LDA/GSVD-QR

Let Hb = Σ−1/2b1 UT

b1Hb ∈ Rq×k, where Σb1 andUb1 are same as in (5), and consider the QR decom-position of Hb : Hb = QbRb. If the EVD of St inAlgorithm 5 is replaced by the QR decomposition ofHb, we can get an improve version of LDA/range(Sb),namely LDA/range(Sb)-QR-1.

Algorithm 9: LDA/range(Sb)-QR-1Input : Data matrix A ∈ Rn×N

Output : Reduced data matrix AL

1. Compute Hb ∈ Rn×k according to (2);2. Sb ← HbH

Tb ;

3. Compute the EVD of Sb

Sb =[Ub1 Ub2

] [ Σb1 00 0

] [UTb1

UTb2

];

4. Compute Qb from the QR decompositionof Hb =

∑−1/2b1 UT

b1Hb: Hb = QbRb;5. G← Ub1

∑−1/2b1 Qb;

6. AL = GTA.

Another improve version of LDA/range(Sb), namelyLDA/range(Sb)-QR-2, is a two-step method. Firstly,consider the QR decomposition of Hb : Hb = QbRb

and let

Sw = QTb SwQb = QT

b HwHTwQb = HwH

Tw ,

Sb = QTb SbQb = QT

b HbHTb Qb = RbR

Tb ,

where Hw = QTb Hw, and then consider the QR de-

composition of Hw : Hw = QwRw. We can obtainthe transformation matrix G = QbQw, that is,

Algorithm 10: LDA/range(Sb)-QR-2Input : Data matrix A ∈ Rn×N

Output : Reduced data matrix AL

1. Compute Hb ∈ Rn×k and Hw ∈ Rn×N

according to (2) respectively;2. Compute the QR decomposition of Hb

Hb = QbRb, where Qb ∈ Rn×q ,Rb ∈ Rq×k and q = rankHb;

3. Compute the QR decomposition ofHw = QT

b Hw : Hw = QwRw,where Qw ∈ Rq×q and Rw ∈ Rq×N ;

4. G← QbQw;5. AL = GTA.

Next, we apply the QR decomposition of matrices toimprove Algorithm 3 and get an improve version of L-DA/GSVD, namely LDA/GSVD-QR. Firstly, consid-er the QR decomposition of Ht : Ht = QtRt andlet Sb = QT

t SbQt = (QTt Hb)(Q

Tt Hb)

T = HbHTb ,

where Hb = QTt Hb. Then, consider the QR decom-

position of Hb : Hb = QbRb and obtain the transfor-mation matrix G = QtQb. Detail steps are listed inAlgorithm 11.

Algorithm 11: LDA/GSVD-QRInput : Data matrix A ∈ Rn×N

Output : Reduced data matrix AL

1. Compute Hb ∈ Rn×k and Ht ∈ Rn×N

according to (2), respectively;2. Compute the QR decomposition of Ht

Ht = QtRt;3. Compute the QR decomposition of

Hb = QTt Hb : Hb = QbRb;

4. G← QtQb;5. AL = GTA.

4 Experiments and analysisIn this section, in order to show the classifica-

tion effectiveness of the proposed methods, we makea series of experiments with 6 different data sets tak-en from ORL faces database [29-30] and Yale facesdatabase [18,29,31]. Data sets 1-3 are taken fromORL face database, which consists of 400 images of40 different people with 10304 attributes for each im-age and has 40 classes. Data set ORL1 chooses from222-th to 799-th dimension, ORL2 from 1901-th to2400-th dimension and ORL3 from 2301-th to 2800-th dimension. Data sets 4-6 come from Yale database,

WSEAS TRANSACTIONS on MATHEMATICS Jianqiang Gao, Liya Fan, Lizhong Xu

E-ISSN: 2224-2880 716 Issue 8, Volume 11, August 2012

Page 6: Solving the face recognition problem using QR factorization · LDA/range(Sb) [7,19] first transforms the original s-pace by using a basis of range(Sb) and then in the ... widely

which contains 165 face images of 15 individuals with1024 attributes for each image and has 10 classes.We randomly take 150 images in Yale database with10 images for each person to make up a database, inwhich data set Yale1 chooses from 1-th to 300-th di-mension, Yale2 from 301-th to 600-th dimension andYale3 from 501-th to 800-th dimension. All data setsare split to a train set and a test set with the ratio 4:1.Experiments are repeated 5 times to obtain mean pre-diction error rate. The K-nearest-neighbor algorithm(KNN) with K=3,4,5,6,7 is used as a classifier for al-l date sets. All experiments are performed on a PC(2.40GHZ CPU, 2G RAM) with MATLAB 7.1.4.1. Comparison PCA/range(Sb) and PCA/range(Sb)-QR with PCA and LDA/range(Sb)

In this subsection, in order to demonstrate theeffectiveness of PCA/range(Sb) and PCA/range(Sb)-QR, we compare them with PCA and LDA/range(Sb)on the six data sets. The experiment result-s are listed in Table 2: For convenience, thispaper call LDA/range(Sb), LDA/range(Sb)-QR-1, LDA/range(Sb)-QR-2, PCA/range(Sb),PCA/range(Sb)-QR, PCA/QR-1, PCA/QR-2, L-DA/GSVD and LDA/GSVD-QR methods LRSb,LRSbQ1, LRSbQ2, PRSb, PRSbQ, PQ1, PQ2, LGDand LGSQ for short, respectively.

Table 2: The error rate of PCA, PCA/range(Sb),PCA/range(Sb)-QR and LDA/range(Sb)

Data set K PCA PRSb PRSbQ LRSb

3 97.25 34.00 23.25 43.504 97.00 35.75 24.00 45.25

ORL1 5 97.25 39.75 24.75 46.756 97.00 40.50 26.00 48.257 97.25 41.50 30.00 48.753 94.75 35.00 20.25 39.004 94.75 38.50 21.00 41.75

ORL2 5 94.75 38.75 24.00 45.506 95.00 39.75 25.00 47.757 96.00 42.75 25.50 48.753 96.50 31.50 18.25 40.004 97.00 36.50 20.25 42.00

ORL3 5 97.00 40.00 23.50 46.006 97.75 43.00 24.50 49.257 98.25 43.00 26.50 49.253 95.30 27.30 32.00 28.704 95.30 29.30 32.00 25.30

Yale1 5 96.00 28.70 34.70 27.306 96.00 29.30 31.30 30.007 96.00 31.30 32.00 29.303 94.70 30.70 27.30 31.304 93.30 31.30 29.30 31.30

Yale2 5 93.30 32.70 28.70 31.306 93.30 33.30 34.00 31.307 95.30 35.30 34.00 34.70

Data set K PCA PRSb PRSbQ LRSb

3 90.70 36.00 38.70 35.304 90.70 33.30 34.00 36.00

Yale3 5 90.70 33.30 33.30 34.006 90.70 33.30 36.70 38.707 94.00 37.30 38.00 42.00

From Table 2, we can see that PCA/range(Sb) andPCA/range(Sb)-QR are generally better than PCA andLDA/range(Sb) for classification accuracy. For da-ta sets ORL1-ORL3 and Yale2 PCA/range(Sb)-QRis obviously better than PCA/range(Sb) and for da-ta sets Yale1 and Yale3 PCA/range(Sb) is better thanPCA/range(Sb)-QR.4.2. Comparison LDA/GSVD-QR, PCA/QR-1 andPCA/QR-2 with LDA/GSVD and LDA/QR

The experiments in this subsection can demon-strate the effectiveness of LDA/GSVD-QR, PCA/QR-1 and PCA/QR-2 by comparing them with L-DA/GSVD and LDA/QR. The experiment results canbe found in Table 3:

Table 3: The error rate of LDA/GSVD, LDA/QR,LDA/GSVD-QR, PCA/QR-1 and PCA/QR-2

Data set K LGD LGSQ PQ1 PQ2 LDA/QR

3 95.00 23.25 23.00 22.25 33.504 93.75 24.00 22.50 22.75 34.25

ORL1 5 92.75 24.75 26.25 23.75 36.756 93.75 26.00 27.75 25.25 38.257 94.75 30.00 28.25 27.00 39.753 94.50 20.25 20.00 19.00 34.504 95.00 21.00 20.75 20.25 36.00

ORL2 5 94.75 24.00 24.00 23.25 39.256 94.25 25.00 24.75 23.25 41.007 94.75 25.50 28.75 25.25 42.003 92.00 18.25 19.50 20.50 31.504 93.50 20.25 21.25 21.25 33.50

ORL3 5 94.00 23.50 23.75 24.00 36.756 93.00 24.50 25.00 24.25 40.007 92.75 26.50 26.75 26.00 41.503 90.00 32.00 31.30 31.30 24.704 90.70 32.00 31.30 31.30 24.70

Yale1 5 88.70 34.70 32.70 33.30 28.006 90.00 31.30 31.30 36.70 27.307 90.70 32.00 29.30 33.30 28.003 85.30 27.30 23.30 32.00 30.704 84.70 29.30 22.70 33.30 31.30

Yale2 5 86.00 28.70 28.00 32.00 34.006 84.70 34.00 26.00 33.30 33.307 82.00 34.00 30.00 34.70 34.003 87.30 38.70 31.30 39.30 32.704 86.70 34.00 30.00 39.30 31.30

Yale3 5 85.30 33.30 32.00 39.30 32.006 84.00 36.70 28.70 38.00 34.007 86.00 38.00 31.30 36.70 34.00

From Table 3, we can see that LDA/GSVD-QR,PCA/QR-1 and PCA/QR-2 are generally better

WSEAS TRANSACTIONS on MATHEMATICS Jianqiang Gao, Liya Fan, Lizhong Xu

E-ISSN: 2224-2880 717 Issue 8, Volume 11, August 2012

Page 7: Solving the face recognition problem using QR factorization · LDA/range(Sb) [7,19] first transforms the original s-pace by using a basis of range(Sb) and then in the ... widely

than LDA/GSVD and LDA/QR for classificationaccuracy. For data sets ORL1 and ORL2 PCA/QR-2is better than LDA/GSVD-QR and PCA/QR-1 andfor data sets Yale1-Yale3 PCA/QR-1 is better thanLDA/GSVD-QR and PCA/QR-2. For Yale1 LDA/QRis the best in five algorithms and for Yale3 PCA/QR-1is the best.4.3. Comparison LDA/range(Sb)-QR-1 andLDA/range(Sb)-QR-2 with LDA/range(Sb)

In this subsection, in order to demonstrate theeffectiveness of LDA/range(Sb)-QR-1 and LDA/range(Sb)-QR-2, we compare them withLDA/range(Sb). The experiment results are asfollows:

Table 4: The error rate of LDA/range(Sb),LDA/range(Sb)-QR-1 and LDA/range(Sb)-QR-2

Data set K LRSb LRSbQ1 LRSbQ2

3 43.50 34.00 23.254 45.25 35.75 24.00

ORL1 5 46.75 39.75 24.756 48.25 40.50 26.007 48.75 41.50 30.003 39.00 35.00 20.254 41.75 38.50 21.00

ORL2 5 45.50 38.75 24.006 47.75 39.75 25.007 48.75 42.75 25.503 40.00 31.50 18.254 42.00 36.50 20.25

ORL3 5 46.00 40.00 23.506 49.25 43.00 24.507 49.25 43.00 26.503 28.70 27.30 32.004 25.30 29.30 32.00

Yale1 5 27.30 28.70 34.706 30.00 29.30 31.307 29.30 31.30 32.003 31.30 30.70 27.304 31.30 31.30 29.30

Yale2 5 31.30 32.70 28.706 31.30 33.30 34.007 34.70 35.30 34.003 35.30 36.00 38.704 36.00 33.30 34.00

Yale3 5 34.00 33.30 33.306 38.70 33.30 36.707 42.00 37.30 38.00

From Table 4, we can see that for data sets ORL1-ORL3 LDA/range(Sb)-QR-1 is obviously better thanLDA/range(Sb) and LDA/range(Sb)-QR-2 is obvious-ly better than LDA/range(Sb)-QR-1. LDA/range(Sb)-QR-2 is the worst in three algorithms for Yale1,but the best for Yale2 with K=3,4,5,7. For Yale3LDA/range(Sb)-QR-1 is better than LDA/range(Sb)

and LDA/range(Sb)-QR-2 for k=4,5,6,7.4.4. Visual comparison of different approaches

In this subsection, In order to illustrate the effec-tiveness of the QR decomposition outperforms previ-ous approaches on classification accuracy rate, we fur-ther compare the improvement methods on the ORLand Yale database with different K values. The exper-iment results are shown from Fig.1 to Fig.4.

Fig.1 and Fig.2 are show the deformed version ofPCA, Fig.3 and Fig.4 are show the deformed versionof LDA.

3 3.5 4 4.5 5 5.5 6 6.5 70

10

20

30

40

50

60

70

80

Number of KNNR

ecog

nitio

n ra

tes(

%)

PCA−based (ORL1)

PCAPCA/range(Sb)PCA/range(Sb)−QRPCA/QR−1PCA/QR−2

3 3.5 4 4.5 5 5.5 6 6.5 70

10

20

30

40

50

60

70

80

90

Number of KNN

Rec

ogni

tion

rate

s(%

)

PCA−based (ORL2)

PCAPCA/range(Sb)PCA/range(Sb)−QRPCA/QR−1PCA/QR−2

3 3.5 4 4.5 5 5.5 6 6.5 70

10

20

30

40

50

60

70

80

90

Number of KNN

Rec

ogni

tion

rate

s(%

)

PCA−based (ORL3)

PCAPCA/range(Sb)PCA/range(Sb)−QRPCA/QR−1PCA/QR−2

Fig.1 Recognition rates of PCA, PCA/range(Sb),

PCA/range(Sb)-QR, PCA/QR-1 and PCA/QR-2 under ORL.

From Fig.1 to Fig.4 we clear to see that QR de-composition play an important role in classificationaccuracy rate.

5 ConclusionIn this paper, we introduce a new algorithmPCA/range(Sb) and five improve versions of three

WSEAS TRANSACTIONS on MATHEMATICS Jianqiang Gao, Liya Fan, Lizhong Xu

E-ISSN: 2224-2880 718 Issue 8, Volume 11, August 2012

Page 8: Solving the face recognition problem using QR factorization · LDA/range(Sb) [7,19] first transforms the original s-pace by using a basis of range(Sb) and then in the ... widely

3 3.5 4 4.5 5 5.5 6 6.5 70

10

20

30

40

50

60

70

80

Number of KNN

Rec

ogni

tion

accu

racy

(%)

PCAPCA/range(Sb)PCA/range(Sb)−QRPCA/QR−1PCA/QR−2

3 3.5 4 4.5 5 5.5 6 6.5 70

10

20

30

40

50

60

70

80

Number of KNN

Rec

ogni

tion

accu

racy

(%)

PCAPCA/range(Sb)PCA/range(Sb)−QRPCA/QR−1PCA/QR−2

3 3.5 4 4.5 5 5.5 6 6.5 70

10

20

30

40

50

60

70

80

Number of KNN

Rec

ogni

tion

rate

s(%

)

PCA−based (Yale3)

PCAPCA/range(Sb)PCA/range(Sb)−QRPCA/QR−1PCA/QR−2

Fig.2 Recognition rates of PCA, PCA/range(Sb),

PCA/range(Sb)-QR, PCA/QR-1 and PCA/QR-2 under Yale.

3 3.5 4 4.5 5 5.5 6 6.5 70

10

20

30

40

50

60

70

80

Number of KNN

Rec

ogni

tion

rate

s(%

)

LDA−based (ORL1)

LDA/GSVDLDA/range(Sb)LDA/QRLDA/GSVD−QR

known algorithms and PCA/range(Sb) by means ofQR decomposition for small size problems. In orderto explain the classification effectiveness of present-ed methods, we perform a series of experiments withsix data sets taken from ORL and Yale faces databas-es. The experiment results show that the presentedalgorithms are better than PCA, LDA/range(Sb), L-DA/GSVD and LDA/QR in generally. From Tables

3 3.5 4 4.5 5 5.5 6 6.5 70

10

20

30

40

50

60

70

80

Number of KNN

Rec

ogni

tion

rate

s(%

)

LDA−based (ORL2)

LDA/GSVDLDA/range(Sb)LDA/QRLDA/GSVD−QR

3 3.5 4 4.5 5 5.5 6 6.5 70

10

20

30

40

50

60

70

80

90

Number of KNN

Rec

ogni

tion

rate

s(%

)

LDA−based (ORL3)

LDA/GSVDLDA/range(Sb)LDA/QRLDA/GSVD−QR

Fig.3 Recognition rates of LDA/GSVD, LDA/range(Sb),

LDA/QR and LDA/GSVD-QR under ORL.

3 3.5 4 4.5 5 5.5 6 6.5 70

10

20

30

40

50

60

70

80

Number of KNN

Rec

ogni

tion

rate

s(%

)

LDA−based (Yale1)

LDA/GSVDLDA/range(Sb)LDA/QRLDA/GSVD−QR

3 3.5 4 4.5 5 5.5 6 6.5 710

20

30

40

50

60

70

80

Number of KNN

Rec

ogni

tion

rate

s(%

)

LDA−based (Yale2)

LDA/GSVDLDA/range(Sb)LDA/QRLDA/GSVD−QR

2-4, we can see that PCA products very poor clas-sification result, but PCA/QR-1 and PCA/QR-2 aremuch better than PCA for the six data sets, which il-lustrates that QR decomposition can really improveclassification accuracy for discriminant analysis. In11 algorithms mentioned in this paper, PCA and L-DA/GSVD are the worst algorithms, and PCA/QR-2

WSEAS TRANSACTIONS on MATHEMATICS Jianqiang Gao, Liya Fan, Lizhong Xu

E-ISSN: 2224-2880 719 Issue 8, Volume 11, August 2012

Page 9: Solving the face recognition problem using QR factorization · LDA/range(Sb) [7,19] first transforms the original s-pace by using a basis of range(Sb) and then in the ... widely

3 3.5 4 4.5 5 5.5 6 6.5 70

10

20

30

40

50

60

70

Number of KNN

Rec

ogni

tion

rate

s(%

)LDA−based (Yale3)

LDA/GSVDLDA/range(Sb)LDA/QRLDA/GSVD−QR

Fig.4 Recognition rates of LDA/GSVD, LDA/range(Sb),

LDA/QR and LDA/GSVD-QR under Yale.

and LDA/range(Sb)-QR-2 are more better than othersfor classification accuracy. Visual comparison of dif-ferent approaches show the effective of QR decompo-sition.

Acknowledgements: The research is support-ed by NSF (grant No.10871226), NSF (grant No.ZR2009AL006) of Shandong Province and Youngand Middle-Aged Scientists Research Foundation(grant No. BS2010SF004) of Shandong Province,P.R. China. Corresponding author: Liya Fan, [email protected].

References:

[1] R. Bellmanna, Adaptive control processes: aguided tour, princeton university press, 1961.

[2] R. Duda, P. Hart, D. Stork, pattern classification,second ed., wiley, New York, 2000.

[3] K. Fukunaga, Introduction to statistical patternclassification academic press, San Diego, Cali-fornia, USA, 1990.

[4] T. Hastie, R. Tibshirani, J.H. Friedman, The ele-ments of statistical learning: data mining, infer-ence, and prediction, Springer, 2001.

[5] I.T Jolliffe, Principal Component Analysis, Sec-ond ed., Springer-Verlag, New York, 2002.

[6] I.T. Jolliffe, Principal component analysis,Springer-Verlag, New York, 1986.

[7] H. Yu, J. yang, A direct LDA algorithm for high-dimensional data with application to face recog-nition, pattern recognition, 34, 2001, pp. 2067–2070.

[8] A. Basilevsky, Statistical factor analysis and re-lated methods, theory and applications, Wiley,New York, 1994.

[9] C. Chatfield, Introduction to multivariate analy-sis, chapman and hall, london, New York, 1980.

[10] A.C. Rencher, Methods of multivariate analysis,Wiley, New York, 1995.

[11] D.L. Swets, J. Weng, Using discriminant eigen-features for image retrieval, IEEE Trans PatternAnal Mach Intell,18, 1996, (8), pp. 831–836.

[12] M. Loog, R.P.W. Duin, R. Hacb-Umbach, Mul-ticlass linear dimensuin reduction by weightedpairwise fisher criteria, pattern recognition andmachine intelligence, 23, 2001, pp. 762–766.

[13] A. Jain, D. Zongker, Feature slection: applica-tion and small sample performance, IEEE tran-sations on pattern analysis and machine intelli-gence, 19, 1997, (2), pp. 153–158.

[14] H.M. Lec, C.M. Chen, Y.L. Jou, An efficien-t fuzzy classifier with feature selection basedon fuzzy entropy, IEEE transations on systems,man, and cybernetics B, 31, 2001, (3), pp. 426–432.

[15] N.R. Pal, V.K. Eluri, Two efficient connectionistschemes for structure preserving dimensuinalityreduction, IEEE transations on neural networks,9, 1998, (6), pp. 1142–1154.

[16] W.J. Krzanowski, P. Jonathan, W.V. McCarthy,M.R. Thomas, Discriminant analysis with sin-gular covariance matrices: methods and applica-tions to speetroscopic data, applied statistic, 44,1995, pp. 101–115.

[17] J. Ye, R. Janardan, C.H. Park, and H. Park, Anoptimization criterion for generalized discrimi-nant analysis on undersampled problem, IEEEtrans,pattern analysis and machine intelligence,26, 2004, (8), pp. 982–994.

[18] P. Belhumeur, J.P. Hespanha, D.J. Kriegman,Eigenfaces va. fisherface recognition using classspecific linear projection, pattern recognitionand machine intelligence, 19, 1997, (7), pp.711–720.

[19] C.H. Park, H. Park, A comparison of generalizedlinear discriminant analysis algorithms, PatternRecognition, 41, 2008, pp. 1083–1097.

[20] P. Howland, M. Jeon, H. Park, structure preserv-ing dimension reduction for clustered text databased on the generalized singular value decom-position, SIAM J. matrix analysis and applica-tions, 25, 2003, (1), pp. 165–179.

[21] P. Howland, H. Park, Generalizing discriminantanalysis using the generalized singular value de-composition, IEEE trans., pattern anal., mach.intell., 26, 2004, (8), pp. 995–1006.

[22] J. Ye, Q. Li, LDA/QR: An efficient and effectivedimension reduction algorithm and its theoret-ical foundation, pattern recognition, 37, 2004,pp. 851–854.

WSEAS TRANSACTIONS on MATHEMATICS Jianqiang Gao, Liya Fan, Lizhong Xu

E-ISSN: 2224-2880 720 Issue 8, Volume 11, August 2012

Page 10: Solving the face recognition problem using QR factorization · LDA/range(Sb) [7,19] first transforms the original s-pace by using a basis of range(Sb) and then in the ... widely

[23] J. Ye and Q. Li, A two-stage linear discriminan-t analysis via QR-decomposition, IEEE trans-action on pattern analysis and machine intelli-gence, 27, 2005, (6), pp. 929–941.

[24] C.F. Vanloan, Generalizing the singular valuedecomposition,SIAM J. numerical analysis, 13,1976, pp. 76–83.

[25] G.H. Golub, C.F. Vanloan, Matrix computations,third ed. the johns hopkins univ. press, 1996.

[26] C.C. Paige, M.A. Saunders, Towards a general-ized singular value decomposotion, SIAM J. nu-mer anal., 18, 1981, (3), pp. 398–405.

[27] P. Howland, H. Park, Equivalence of severaltwo-stage methods for linear discriminant anal-ysis, in: proceedings of the fourth SIAM interna-tional conference on data mining, 4, 2004, pp.69–77.

[28] H. Park, M. Jeon, J. Rosen, lower dimension-al representation of text data based on centroidsand least spuares, BIT, 43, 2003, (2) pp. 1–22.

[29] L.M. Zhang, L.S. Qiao, S.C. Chen, Graph-optimized locality preserving projections, pat-tern recognition, 43, 2010, (6), pp. 1993–2002.

[30] ORL database<http://www.uk.research.att.com/facedatabase.html>, 2002.

[31] Yale database<http://cvc.yale.edu/projects/yalefaces/yalefaces.html>, 2002.

[32] JianQiang Gao, Liya Fan, Kernel-based weight-ed Discriminant Analysis with QR Decom- po-sition and Its Application Face Recognition.WSEAS Transactions on Mathematics,10, 2011,(10), pp. 358–367.

WSEAS TRANSACTIONS on MATHEMATICS Jianqiang Gao, Liya Fan, Lizhong Xu

E-ISSN: 2224-2880 721 Issue 8, Volume 11, August 2012