diff --git a/text/thesis/02MaterialsAndMethods.tex b/text/thesis/02MaterialsAndMethods.tex index 295079c..8fb7408 100644 --- a/text/thesis/02MaterialsAndMethods.tex +++ b/text/thesis/02MaterialsAndMethods.tex @@ -90,7 +90,7 @@ The PCA of data can be done in different ways. One is calculating the eigenvectors of the covariance matrix. The principal component is the eigenvector with the highest eigenvalue. Other eigenvectors follow ordered by their eigenvalues.\\ \begin{figure} \centering - \includegraphics[width=0.7\textwidth]{GaussianScatterPCA.jpg} + \includegraphics[width=0.7\textwidth]{pictures/GaussianScatterPCA.jpg} \caption{Gaussian Scatter with both eigenvectors, the principal component (long arrow) explaining most, the other least variance} \label{fig:pca} \end{figure} @@ -128,7 +128,7 @@ An autoencoder's input layer has as many neurons as there are input dimensions (e.g. one for each EMG channel). The number of hidden layer neurons may be varied, here usually 3 are used. The output layer is of the same size as the input layer. This autoencoder is shown in Figure~\ref{fig:autoenc}. \begin{figure} \centering - \input{autoencoder.tikz} + \input{pictures/autoencoder.tikz} \caption{Autoencoder with 6 input and 6 output neurons and a hidden layer of size 3} \label{fig:autoenc} \end{figure} @@ -256,7 +256,7 @@ surface EMG and 7 DOF kinematics were tracked. \begin{figure} \centering - \includegraphics{experimentalDesign.jpg} + \includegraphics{pictures/experimentalDesign.jpg} \caption{Center-out reaching task with four color-coded targets (picture from \cite{Shiman15})} \label{fig:experimentalDesign} \end{figure} diff --git a/text/thesis/GaussianScatterPCA.jpg b/text/thesis/GaussianScatterPCA.jpg deleted file mode 100644 index d0455eb..0000000 --- a/text/thesis/GaussianScatterPCA.jpg +++ /dev/null Binary files differ diff --git a/text/thesis/autoencoder.tikz b/text/thesis/autoencoder.tikz deleted file mode 100644 index 9bb422b..0000000 --- a/text/thesis/autoencoder.tikz +++ /dev/null @@ -1,29 +0,0 @@ -\begin{tikzpicture}[->,auto,x=1.5cm, y=1.5cm] - -\foreach \i in {1,2,3,4,5,6} - \node [state] (input-\i) at (0,2.5-\i) {}; - -\foreach \i in {1,2,3} - \node [state] (hidden-\i) at (3,2-\i*1.25) {}; - -\foreach \i in {1,2,3,4,5,6} - \node [state] (output-\i) at (6,2.5-\i) {}; - -\foreach \i in {1,2,3} - \foreach \j in {1,2,3,4,5,6} - \draw (hidden-\i) -- (output-\j); - -\foreach \i in {1,2,3,4,5,6} - \foreach \j in {1,2,3} - \draw (input-\i) -- (hidden-\j); - - -\foreach \i in {1,2,3,4,5,6} - \draw [<-] (input-\i) -- ++(-1,0) - node [above, midway] {Ch \i}; - -\foreach \i in {1,2,3,4,5,6} - \draw [->] (output-\i) -- ++(1,0) - node [above, midway] {Ch \i}; - -\end{tikzpicture} diff --git a/text/thesis/experimentalDesign.jpg b/text/thesis/experimentalDesign.jpg deleted file mode 100644 index a2f0470..0000000 --- a/text/thesis/experimentalDesign.jpg +++ /dev/null Binary files differ diff --git a/text/thesis/pca.py b/text/thesis/pca.py deleted file mode 100644 index 7ab0948..0000000 --- a/text/thesis/pca.py +++ /dev/null @@ -1,32 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -from matplotlib import rcParams - -rcParams['font.family'] = 'serif' -rcParams['font.size'] = 16 - - -ang = np.pi/6 -mean = np.array([1, 3]) -cov = np.array([[9, 0], - [0, 1]]) -rot = np.array([[np.cos(ang), -np.sin(ang)], - [np.sin(ang), np.cos(ang)]]) -cov = np.dot(rot, np.dot(cov, rot.T)) - -np.random.seed(seed=1) -data = np.random.multivariate_normal(mean, cov, size=(5000)) -x = data[:, 0] -y = data[:, 1] - -plt.figure(figsize=(8, 8)) -plt.scatter(x, y, c="k", alpha=0.5, lw=0) -plt.arrow(1, 3, 3*np.cos(ang), 3*np.sin(ang), width=0.02, color="r", lw=2, - overhang=0.1) -plt.arrow(1, 3, -np.sin(ang), np.cos(ang), width=0.02, color="r", lw=2, - overhang=0.1) -plt.grid(True) -plt.axis("image") -plt.axis([-8, 10, -6, 12]) -plt.savefig("GaussianScatterPCA.jpg") -plt.show() diff --git a/text/thesis/pictures/GaussianScatterPCA.jpg b/text/thesis/pictures/GaussianScatterPCA.jpg new file mode 100644 index 0000000..10bed8b --- /dev/null +++ b/text/thesis/pictures/GaussianScatterPCA.jpg Binary files differ diff --git a/text/thesis/pictures/autoencoder.tikz b/text/thesis/pictures/autoencoder.tikz new file mode 100644 index 0000000..9bb422b --- /dev/null +++ b/text/thesis/pictures/autoencoder.tikz @@ -0,0 +1,29 @@ +\begin{tikzpicture}[->,auto,x=1.5cm, y=1.5cm] + +\foreach \i in {1,2,3,4,5,6} + \node [state] (input-\i) at (0,2.5-\i) {}; + +\foreach \i in {1,2,3} + \node [state] (hidden-\i) at (3,2-\i*1.25) {}; + +\foreach \i in {1,2,3,4,5,6} + \node [state] (output-\i) at (6,2.5-\i) {}; + +\foreach \i in {1,2,3} + \foreach \j in {1,2,3,4,5,6} + \draw (hidden-\i) -- (output-\j); + +\foreach \i in {1,2,3,4,5,6} + \foreach \j in {1,2,3} + \draw (input-\i) -- (hidden-\j); + + +\foreach \i in {1,2,3,4,5,6} + \draw [<-] (input-\i) -- ++(-1,0) + node [above, midway] {Ch \i}; + +\foreach \i in {1,2,3,4,5,6} + \draw [->] (output-\i) -- ++(1,0) + node [above, midway] {Ch \i}; + +\end{tikzpicture} diff --git a/text/thesis/pictures/experimentalDesign.jpg b/text/thesis/pictures/experimentalDesign.jpg new file mode 100644 index 0000000..a2f0470 --- /dev/null +++ b/text/thesis/pictures/experimentalDesign.jpg Binary files differ diff --git a/text/thesis/pictures/pca.py b/text/thesis/pictures/pca.py new file mode 100755 index 0000000..6d74cee --- /dev/null +++ b/text/thesis/pictures/pca.py @@ -0,0 +1,34 @@ +#!/usr/bin/python + +import numpy as np +import matplotlib.pyplot as plt +from matplotlib import rcParams + +rcParams['font.family'] = 'serif' +rcParams['font.size'] = 16 + + +ang = np.pi/6 +mean = np.array([1, 3]) +cov = np.array([[9, 0], + [0, 1]]) +rot = np.array([[np.cos(ang), -np.sin(ang)], + [np.sin(ang), np.cos(ang)]]) +cov = np.dot(rot, np.dot(cov, rot.T)) + +np.random.seed(seed=1) +data = np.random.multivariate_normal(mean, cov, size=(5000)) +x = data[:, 0] +y = data[:, 1] + +plt.figure(figsize=(8, 8)) +plt.scatter(x, y, c="k", alpha=0.5, lw=0) +plt.arrow(1, 3, 3*np.cos(ang), 3*np.sin(ang), width=0.02, color="w", lw=2, + overhang=0.1) +plt.arrow(1, 3, -np.sin(ang), np.cos(ang), width=0.02, color="w", lw=2, + overhang=0.1) +plt.grid(True) +plt.axis("image") +plt.axis([-8, 10, -6, 12]) +plt.savefig("GaussianScatterPCA.jpg") +plt.show()