Conventional dimensionality reduction algorithms aim to attain low recognition errors, assuming the same misclassification loss from different misclassifications. In some real-world applications, however, this assumption may not hold. For example, in the doorlocker syetem based on face recognition, there are impostor and gallery person. The loss of misclassifying an impostor as a gallery person is larger than misclassifying a gallery person as an impostor, while the loss of misclassifying a gallery person as an impostor can be larger than misclassifying a gallery person as other gallery persons. This paper recognizes the door-locker system based on face recognition as a cost-sensitive subclass learning problem, incorporates the subclass information and misclassification costs into the framework of discriminant analysis at the same time, and proposes a dimensionality reduction algorithm approximate to the pairwise Bayes risk. The experimental results on face datasets Extended Yale B and ORL demonstrate the superiority of the proposed algorithm.