aboutsummaryrefslogtreecommitdiff
path: root/report
diff options
context:
space:
mode:
authornunzip <np.scarh@gmail.com>2018-11-07 16:32:37 +0000
committernunzip <np.scarh@gmail.com>2018-11-07 16:32:37 +0000
commitadf19301ef6e661d09351f23b939605f229c10d2 (patch)
treea3552e49b9a0ee0295dce665658801c16d04705d /report
parentccd81ab20d829a60211b3922eb787bee1cf59dbe (diff)
downloadvz215_np1915-adf19301ef6e661d09351f23b939605f229c10d2.tar.gz
vz215_np1915-adf19301ef6e661d09351f23b939605f229c10d2.tar.bz2
vz215_np1915-adf19301ef6e661d09351f23b939605f229c10d2.zip
Version 1
Diffstat (limited to 'report')
-rwxr-xr-x[-rw-r--r--]report/paper.md109
1 files changed, 75 insertions, 34 deletions
diff --git a/report/paper.md b/report/paper.md
index 8ea9791..113dfa6 100644..100755
--- a/report/paper.md
+++ b/report/paper.md
@@ -1,49 +1,90 @@
-# Introduction
+# Question 1, Eigenfaces
-An introduction. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
-do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
-veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
-consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
-cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
-proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+The data is partitioned to allow random selection of the
+same amount of samples for each class. This is done to
+prevent overfitting (?) of some classes with respect to others. In
+such way, each training vector space will be generated with
+the same amount of elements. The test data will instead
+be taken from the remaining samples. Testing on accuracy
+with respect to data partition indicates that the maximum
+accuracy is obtained when using a 90% of the data for
+training. Despite such results we will be using 80% of the data
+for training as a standard. This will allow to give more than one
+example of success and failure for each class when classifying the
+test_data.
-# Method
+![Classification Accuracy of Test Data vs % of data used for training](fig/partition.pdf "Partition")
-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
-tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
-vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
-no sea takimata sanctus est Lorem ipsum dolor sit amet.
+After partitioning the data into training and testing sets,
+PCA is applied. The covariance matrix, S, of dimension
+2576x2576 (features x features), will have 2576 eigenvalues
+and eigenvectors. The amount of non-zero eigenvalues and
+eigenvectors obtained will only be equal to the amount of
+training samples minus one. This can be observed in the
+graph below as a sudden drop for eigenvalues after the
+415th.
-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
-tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
-vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
-no sea takimata sanctus est Lorem ipsum dolor sit amet.
+![Log PCA Eigenvalues](fig/eigenvalues.pdf "Eigenvalues")
-# Footnotes
+The mean image is calculated averaging the features of the
+training data. Changing the randomization seed will give
+very similar values, since the vast majority of the training
+faces used for averaging will be the same. The mean face
+for our standard seed can be observed below.
-Example of footnote^[A footnote example]. Lorem ipsum dolor sit amet, consectetur
-adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
-aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
-ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
-voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
-occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim
-id est laborum.
+![Mean Face](fig/mean_face.pdf){ width=1em }
-# Cites
-Zotero + Better BibTex. All cites are on the file bibliography.bib. This is
-a cite[@djangoproject_models_2016].
+To perform face recognition we choose the best M eigenvectors
+associated with the largest eigenvalues. We tried
+different values of M, and we found an optimal point for
+M=120. After such value the accuracy starts to flaten, with
+some exception for points at which accuracy decreases.
+WE NEED TO ADD PHYSICAL MEANINGS
-# Conclusion
+![Recognition Accuracy of Test data varying M](fig/accuracy.pdf "Accuracy1")
+
+# Question 1, Application of eigenfaces
+
+rming the low-dimensional computation of the
+eigenspace for PCA we obtain the same accuracy results
+of the high-dimensional computation previously used. A
+comparison between eigenvalues and eigenvectors of the
+two computation techniques used shows that the difference
+is very small. The difference we observed is due to rounding
+of the np.eigh function when calculating the eigenvalues
+and eigenvectors of the matrices ATA (DxD) and AAT
+(NxN).
+
+The first ten biggest eigenvalues obtained with each method
+are shown in the table below.
-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
-tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
-vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
-no sea takimata sanctus est Lorem ipsum dolor sit amet.
+\begin{table}[ht]
+\centering
+\begin{tabular}[t]{cc}
+PCA &Fast PCA\\
+2.9755E+05 &2.9828E+05\\
+1.4873E+05 &1.4856E+05\\
+1.2286E+05 &1.2259E+05\\
+7.5084E+04 &7.4950E+04\\
+6.2575E+04 &6.2428E+04\\
+4.7024E+04 &4.6921E+04\\
+3.7118E+04 &3.7030E+04\\
+3.2101E+04 &3.2046E+04\\
+2.7871E+04 &2.7814E+04\\
+2.4396E+04 &2.4339E+04\\
+\end{tabular}
+\caption{Comparison of eigenvalues obtain with the two computation methods}
+\end{table}
-If you want to write an equation:
+It can be proven that the eigenvalues and eigenvectors
+obtain are the same: ##PROVE
-$$ x^2 = \frac{\pi}{2} $$
+Reconstruction is then performed on a chosen
+# Cites
+
+
+# Conclusion
# References