Professional Documents
Culture Documents
CS485 CW1
CS485 CW1
I. E IGENFACES
A. By computing directly from the covariance matrix
Before doing PCA, we have to compute the mean (i.e. mean
face in the Eigenfaces). The result is illustrated as Fig.1.
1
better results. Regarding number of top PCs, we think 100 to
150 are good enough to achieve the best result. Hereinafter,
we search other learning methods with considering of M only
from 120 to 150. We also visualize confusion matrix for the
best case of 63.46% accuracy (M=130, K=3 by Euclidean
distance) as in Fig.8. Some successful and failed cases by
this model are shown in Fig.7
2
To compare the reconstruction abilities of the three models, and Manhattan, Cosine and Euclidean distance, the average
we used M=130 bases in all the following reconstructions. The accuracy was 81.92%, already a big improvement. The highest
resulting faces (first and last from the dataset) of these models average (and the highest accuracy) was achieved with Cosine
are shown in Fig.9. distance, so only this metric will be further considered. The
accuracies for k where the average accuracy is highest and
where the highest accuracy lies are shown below:
B. PCA-LDA Ensemble
(a) First subset PCA. (b) Incremental PCA. Using the above method, the accuracy might be improved
Fig. 10: Confusion matrices. even more using ensemble learning. To limit the compuational
parameters for optimization, the used metric will be cosine
III. LDA E NSEMBLE FOR FACE R ECOGNITION only, and Mpca will be fixed to the previously optimal 190.
The variables thus will be: number of base models T [10, 150,
A. PCA-LDA step 10], randomness parameter ratio Nρ [0.1, 1.0 step 0.05],
LDA Face Recognition works by applying LDA to PCA random features ratio [0.1, 1.0 step 0.05] and fusion method.
data, and using KNN classifier. The parameters for this method Mlda [10, 100] and K[3, 19] will be chosen randomly for each
are Mpca , Mlda , K neighbors and distance metrics. Fisherfaces base, together with learning samples and dropped features. The
for this method are shown in Fig.19. selected fusion methods are majority, average and max (as min
Upon iterating this method for Mpca from 100 to 250 skip and product would not work due to 0 probabilities for some
10, Mlda from 10 to 100 skip 10, K from 1 to 19 skip 2, classes using KNN bases).
3
Upon iteration through all the parameters, three optimal trees, degree of randomness and type of weak learners; also the
solutions with accuracy equal to 97.1% became apparent: top M PCs. We consider number of trees nT [100 to 400] (skip
[T=100, rpr=1, rfr=0.7, fusion=’average’], [T=100, rpr=0.95, 20); max depth of tree dt [5 to 15]; for randomness, random
rfr=0.6, fusion=’average’], and [T=120, rpr=0.9, rfr=0.65, fu- seed [0,1] and max number
√ of features (let nF is full number)
sion=’majority’]. It is worth noting that these results are based to consider split are nF and 0.5nF; and axis-aligned, 2-pixel
on pseudo-random choices of dropout and sample selection, test are 2 types of weaker learner. To keep the report brief,
but based on three close-by results the following control we fixed Gini impurity to measure the quality of a split.
variables will be considered: T=100, rpr=0.95, rfr=0.65, and With axis-aligned learners, RF gave the best result of 75%
average fusion. √ at the configure M=100, nT = 360, dt = 10, seed=0
accuracy
Next iteration using only this model again yielded the and nF . Confusion matrix this case is illustrated in Fig.16.
accuracy of 97.1%. Its error of the committee machine was Some test cases by this are also shown in Fig.15. Duration of
0.0288, while the average error of individual models was training is 3147 ms while testing time is 35 ms for whole set.
0.5368, higher by a factor of 18.6. The confusion matrix of
this ensemble is shown in Fig.14:
4
R EFERENCES
[1] Muhammad Aminu and Noor Atinah Ahmad. Locality preserving partial
least squares discriminant analysis for face recognition. Journal of King
Saud University - Computer and Information Sciences, 34(2):153–164,
2022.
[2] Anne-Laure Boulesteix and Korbinian Strimmer. Partial least squares: a
versatile tool for the analysis of high-dimensional genomic data. Briefings
in bioinformatics, 8(1):32–44, 2007.
[3] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David
Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Gener-
ative adversarial nets. Advances in neural information processing systems,
27, 2014.
A PPENDIX A
F IRST A PPENDIX
Fig. 18: The top 5 eigenfaces of PCA of the first batch (top)
and Incremental PCA (bottom).