In this paper, we propose a novel classifier to face recognition. Compared with the nearest neighbor classifier, which is based on the distances between the test sample and the training samples for classification, our method can exploit the distances between the test sample and the classes of training samples to perform classification. In this method, the training samples in different classes are uncorrelated, but the distance between the test sample and the training samples in one class should be taken into account. The method elaborately improves the ability of recognition rate for face recognition, two famous face databases are used to express the effectiveness. From numerical experiments, we can find that our method can get much higher recognition rate than nearest neighbor classifier.