aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xreport/fig/2dscatter10classespca.pdfbin0 -> 8156 bytes
-rwxr-xr-xreport/fig/altcm.pdfbin0 -> 11796 bytes
-rwxr-xr-xreport/fig/alternative_accuracy.pdfbin0 -> 14760 bytes
-rwxr-xr-xreport/fig/face10rec.pdfbin0 -> 27403 bytes
-rwxr-xr-xreport/fig/face160rec.pdfbin0 -> 25892 bytes
-rwxr-xr-xreport/fig/failure_2_5.pdfbin0 -> 16860 bytes
-rwxr-xr-xreport/fig/failure_6_7.pdfbin0 -> 18204 bytes
-rwxr-xr-xreport/fig/kneighbors_diffk.pdfbin0 -> 17209 bytes
-rwxr-xr-xreport/fig/pcacm.pdfbin0 -> 11823 bytes
-rwxr-xr-xreport/fig/rec_2.pdfbin0 -> 12749 bytes
-rwxr-xr-xreport/fig/rec_6.pdfbin0 -> 12461 bytes
-rwxr-xr-xreport/fig/variance.pdfbin0 -> 18293 bytes
-rwxr-xr-xreport/paper.md49
13 files changed, 35 insertions, 14 deletions
diff --git a/report/fig/2dscatter10classespca.pdf b/report/fig/2dscatter10classespca.pdf
new file mode 100755
index 0000000..be3d024
--- /dev/null
+++ b/report/fig/2dscatter10classespca.pdf
Binary files differ
diff --git a/report/fig/altcm.pdf b/report/fig/altcm.pdf
new file mode 100755
index 0000000..6cb2599
--- /dev/null
+++ b/report/fig/altcm.pdf
Binary files differ
diff --git a/report/fig/alternative_accuracy.pdf b/report/fig/alternative_accuracy.pdf
new file mode 100755
index 0000000..749af26
--- /dev/null
+++ b/report/fig/alternative_accuracy.pdf
Binary files differ
diff --git a/report/fig/face10rec.pdf b/report/fig/face10rec.pdf
new file mode 100755
index 0000000..824067d
--- /dev/null
+++ b/report/fig/face10rec.pdf
Binary files differ
diff --git a/report/fig/face160rec.pdf b/report/fig/face160rec.pdf
new file mode 100755
index 0000000..a9baf29
--- /dev/null
+++ b/report/fig/face160rec.pdf
Binary files differ
diff --git a/report/fig/failure_2_5.pdf b/report/fig/failure_2_5.pdf
new file mode 100755
index 0000000..fe14d50
--- /dev/null
+++ b/report/fig/failure_2_5.pdf
Binary files differ
diff --git a/report/fig/failure_6_7.pdf b/report/fig/failure_6_7.pdf
new file mode 100755
index 0000000..1848576
--- /dev/null
+++ b/report/fig/failure_6_7.pdf
Binary files differ
diff --git a/report/fig/kneighbors_diffk.pdf b/report/fig/kneighbors_diffk.pdf
new file mode 100755
index 0000000..024cc08
--- /dev/null
+++ b/report/fig/kneighbors_diffk.pdf
Binary files differ
diff --git a/report/fig/pcacm.pdf b/report/fig/pcacm.pdf
new file mode 100755
index 0000000..54adaa6
--- /dev/null
+++ b/report/fig/pcacm.pdf
Binary files differ
diff --git a/report/fig/rec_2.pdf b/report/fig/rec_2.pdf
new file mode 100755
index 0000000..1178c92
--- /dev/null
+++ b/report/fig/rec_2.pdf
Binary files differ
diff --git a/report/fig/rec_6.pdf b/report/fig/rec_6.pdf
new file mode 100755
index 0000000..b3b37bf
--- /dev/null
+++ b/report/fig/rec_6.pdf
Binary files differ
diff --git a/report/fig/variance.pdf b/report/fig/variance.pdf
new file mode 100755
index 0000000..58d260f
--- /dev/null
+++ b/report/fig/variance.pdf
Binary files differ
diff --git a/report/paper.md b/report/paper.md
index a806a58..c84530e 100755
--- a/report/paper.md
+++ b/report/paper.md
@@ -1,9 +1,8 @@
# Question 1, Eigenfaces
The data is partitioned to allow random selection of the
-same amount of samples for each class. This is done to
-provide the subspace with (???). In
-such way, each training vector space will be generated with
+same amount of samples for each class.
+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
@@ -34,7 +33,6 @@ for our standard seed can be observed below.
![Mean Face](fig/mean_face.pdf){ width=1em }
-
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
@@ -139,16 +137,39 @@ will be used for each generated class-subspace.
A confusion matrix showing success and failure cases for alternative method classfication
can be observed below:
-![Confusion Matrix alternative method, M=3](fig/altcm.pdf)
-
-It can be observed that even with this more accurate classification, there is one instance
-of mislabel of the same face of class 2 as class 5. An additional classification failure
-of class 6 labeled as class 7 can be observed below:
-
-![Class 6 (left) labeled as class 7 (right)](fig/failure_6_7.pdf)
-
-# Cites
-
+![Confusion Matrix alternative method, M=3](fig/altcm.pdf)
+
+It can be observed that even with this more accurate classification, there is one
+instance of mislabel of the same face of class 2 as class 5. An additional classification
+failure of class 6 labeled as class 7 can be observed below:
+
+![Class 6 (left) labeled as class 7 (right)](fig/failure_6_7.pdf)
+
+# Part 2
+
+Maximize function J(W) (Fisher's Criterion):
+$$ J(W) = \frac{W\textsuperscript{T}S\textsubscript{B}W}{W\textsuperscript{T}S\textsubscript{W}W}\textrm{ or } J(W) = \frac{W\textsuperscript{T}S\textsubscript{B}W}{W\textsuperscript{T}S\textsubscript{t}W}$$
+With S\textsubscript{B} being the scatter matrix between classes, S\textsubscript{W}
+being the within-class scatter matrix and W being the set of projection vectors. $\mu$
+represents the mean vector(???) of each class.
+$$ S\textsubscript{B} = \sum\limits_{c}(\mu\textsubscript{c} - \overline{x})(\mu\textsubscript{c} - \overline{x})\textsuperscript{T} $$
+$$ S\textsubscript{W} = \sum\limits_{c}\sum\limits_{i\epsilon c}(x\textsubscript{i} - \mu\textsubscript{c})(x\textsubscript{i} - \mu\textsubscript{c})\textsuperscript{T} $$
+To maximize J(W) we differentiate with respect to W and equate to zero:
+$$ \frac{d}{dW}J(W) = \frac{d}{dW}(\frac{W\textsuperscript{T}S\textsubscript{B}W}{W\textsuperscript{T}S\textsubscript{W}W}) = 0 $$
+$$ (W\textsuperscript{T}S\textsubscript{W}W)\frac{d(W\textsuperscript{T}S\textsubscript{B}W)}{dW} - (W\textsuperscript{T}S\textsubscript{B}W)\frac{d(W\textsuperscript{T}S\textsubscript{W}W)}{dW} = 0 $$
+$$ (W\textsuperscript{T}S\textsubscript{W}W)2S\textsubscript{B}W - (W\textsuperscript{T}S\textsubscript{B}W)2S\textsubscript{W}W = 0 $$
+$$ S\textsubscript{B}W - JS\textsubscript{W}W = 0 $$
+Multiplying by the inverse of S\textsubscript{W} we obtain:
+$$ S\textsubscript{W}\textsuperscript{-1}S\textsubscript{B}W - JW = 0 $$
+From here it follows:
+$$ W\textsuperscript{*} = argmax(\frac{W\textsuperscript{T}S\textsubscript{B}W}{W\textsuperscript{T}S\textsubscript{W}W}) = S\textsubscript{W}\textsuperscript{-1}(\mu\textsubscript{1} - \mu\textsubscript{2}) $$
+By isomorphic mapping where P are the eigenvectors generated through PCA:
+$$ W = PX $$
+We can substitute for W in the J(W) expression, obtaining:
+$$ J(W) = \frac{X\textsuperscript{T}P\textsuperscript{T}S\textsubscript{B}PX}{X\textsuperscript{T}P\textsuperscript{T}S\textsubscript{t}PX} $$
+We can rewrite such expression substituting for:
+$$ P\textsuperscript{T}S\textsubscript{B}P = \widetilde{S}\textsubscript{B} \textrm{ and } P\textsuperscript{T}S\textsubscript{t}P = \widetilde{S}\textsubscript{t} $$
+$$ J(W) = \widetilde{J}(W) = \frac{X\textsuperscript{T}\widetilde{S}\textsubscript{B}X}{X\textsuperscript{T}\widetilde{S}\textsubscript{t}X} $$
# Conclusion