From 7e32d0485be13f2b6d36ae7dbb2aee8d9a86af7e Mon Sep 17 00:00:00 2001 From: nunzip Date: Tue, 20 Nov 2018 18:55:45 +0000 Subject: Add memory --- report/fig/bagging.pdf | Bin report/fig/ensemble-cm.pdf | Bin report/fig/memalt.pdf | Bin 0 -> 28022 bytes report/fig/memnn.pdf | Bin 0 -> 30606 bytes report/fig/random-ensemble.pdf | Bin 5 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 report/fig/bagging.pdf mode change 100644 => 100755 report/fig/ensemble-cm.pdf create mode 100755 report/fig/memalt.pdf create mode 100755 report/fig/memnn.pdf mode change 100644 => 100755 report/fig/random-ensemble.pdf (limited to 'report') diff --git a/report/fig/bagging.pdf b/report/fig/bagging.pdf old mode 100644 new mode 100755 diff --git a/report/fig/ensemble-cm.pdf b/report/fig/ensemble-cm.pdf old mode 100644 new mode 100755 diff --git a/report/fig/memalt.pdf b/report/fig/memalt.pdf new file mode 100755 index 0000000..acc9ead Binary files /dev/null and b/report/fig/memalt.pdf differ diff --git a/report/fig/memnn.pdf b/report/fig/memnn.pdf new file mode 100755 index 0000000..9689e8f Binary files /dev/null and b/report/fig/memnn.pdf differ diff --git a/report/fig/random-ensemble.pdf b/report/fig/random-ensemble.pdf old mode 100644 new mode 100755 -- cgit v1.2.3-54-g00ecf From 4e2519cf0246364621278f3f59d516f1c9b3d664 Mon Sep 17 00:00:00 2001 From: nunzip Date: Tue, 20 Nov 2018 18:55:56 +0000 Subject: Add memory in NNvsALT --- report/paper.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'report') diff --git a/report/paper.md b/report/paper.md index 0f385c1..aa998b4 100755 --- a/report/paper.md +++ b/report/paper.md @@ -172,7 +172,9 @@ The alternative method shows overall a better performance (see figure \ref{fig:a for M=5. The maximum M non zero eigenvectors that can be used will in this case be at most the amount of training samples per class minus one, since the same amount of eigenvectors will be used for each generated class-subspace. -A major drawback is the increase in execution time (from table \ref{tab:time}, 1.1s on average). +A major drawback is the increase in execution time (from table \ref{tab:time}, 1.1s on average). However the total memory used with the alternative +method is close to the one used with NN. As it can be seen in Appendix \ref{fig:mem}, since we only store the reconstruction error, and the +memory associated with storing the different eigenvectors is deallocated, the total memory usage for alternative method is slightly lower. \begin{figure} \begin{center} @@ -260,9 +262,7 @@ We can model the Lagrange optimization problem under the constraint of ||*e*|| To minimize we take the derivative with respect to *e* and equate L to zero: $\frac {\partial L(e\lambda)}{\partial e}=\frac{\partial F\textsubscript{t}(e)}{\partial e} -+\frac{\partial\lambda(||e||\textsuperscript{2}-1)}{\partial e}=0$. - -Being $\nabla F\textsubscript{t}(e)= (1-t)Se+\frac{t}{ ++\frac{\partial\lambda(||e||\textsuperscript{2}-1)}{\partial e}=0$. Being $\nabla F\textsubscript{t}(e)= (1-t)Se+\frac{t}{ +\epsilon}S\textsubscript{B}e-t\frac{}{(+\epsilon)\textsuperscript{2}S\textsubscript{W}e}$, we obtain that our goal is to find $\nabla F\textsubscript{t}(e)=\lambda e$, which means making $\nabla F\textsubscript{t}(e)$ @@ -421,7 +421,7 @@ The optimal number of constant and random eigenvectors to use is therefore an in \end{center} \end{figure} -The optimal randomness after doing an exhaustive search as seen on figure \ref{fig:opti-rand}peaks at +The optimal randomness after doing an exhaustive search as seen on figure \ref{fig:opti-rand} peaks at 95 randomised eigenvectors out of 155 total eigenvectors, or 60 static and 95 random eigenvectors. The values of $M_{\textrm{lda}}$ in the figures is 51. The red peaks on the 3d-plot represent the proportion of randomised eigenvectors which achieve the optimal accuracy, which have been further plotted in figure \ref{fig:opt-2d}. We found that for our data, the optimal ratio of random eigenvectors for a given $M$ is between $0.6$ and $0.9$. @@ -523,6 +523,17 @@ LDA-PCA & 0.11 & 0.19 & 0.13 \\ \hline \label{tab:time} \end{table} +### Memory Usage for NN and alternative method + +\begin{figure} +\begin{center} +\includegraphics[width=15em]{fig/memnn.pdf} +\includegraphics[width=15em]{fig/memalt.pdf} +\caption{Memory Usage for NN and alternative method} +\label{fig:mem} +\end{center} +\end{figure} + ## Code All code and \LaTeX sources are available at: -- cgit v1.2.3-54-g00ecf