\documentclass[main.tex]{subfiles}
\begin{document}

\subsection{A decay example}

\marginpar{Wednesday\\ 2020-4-1, \\ compiled \\ \today}

This and next week we will finish the introduction to particle physics, then we will start discussing the open problems in cosmology and astroparticle physics.

We consider the following process:
%
\begin{align}
e^{+} e^{-} \to \mu^- \mu^+
\,,
\end{align}
%
where the mass of the electron is around \(m_e \sim \SI{.5}{MeV}\), the mass of the muon is around \(m_{\mu } \sim \SI{100}{MeV}\).

Digression: there are different families of fermions (leptons and quarks), the first encompasses \(e, \nu_{e}, u, d\); the second encompasses \(\mu, \nu_{\mu }, c, s\) and the third encompasses \(\tau, \nu_{\tau }, t, b\).
The characteristics of the four members of the family are well-known, and between families the characteristics are the same: the only thing which varies between the families is the mass.

So, Rabi famously asked ``who ordered the fermions''?

Coming back to our problem: the state \(\ket{e^{+}e^{-}}\) must be annihilated by the EM current \(j^{\mu }_{EM} = \overline{\psi}_e \gamma^{\mu } \psi_e \); it is then converted to a photon, which however is not on mass shell --- it cannot be, since its momentum must be that of the electron-positron pair, so a timelike vector.
It is then called a \emph{virtual photon}: it can exist, as long as it does so for a short time.

Then, this photon decays to a muon-antimuon pair: then we will have a term \(\bra{\mu^- \mu^+} j^{\mu }_(\mu )\). The index between parenthesis is not a Lorentz one, it just means that this is a muonic current, different from the electronic one.

Let us call \(p_{-}\) and \(p_{+}\) the momenta of the electron and positron, and \(p^{\prime }_{-}\) and \(p^{\prime }_{+}\) those of the muon and antimuon.

The momentum \(q\) of the photon cannot have \(q^2  =0 \), but this is fine: it is just an excitation.

The physics of the process is all contained in the matrix element \(\mathcal{M}(e^{+}e^{-} \to \mu^+ \mu^-)\). How do we calculate it? We will not go into details here, but it can be directly derived from the Feynman diagram of the interaction \cite[sec.\ 4.1.2]{tissinoTheoreticalPhysicsNotes2020}: we have
%
\begin{align}
\mathcal{M}(e^{+}e^{-} \to \mu^+ \mu^-) =
(-e)
\bra{\mu^- \mu^+} j^{\mu } \ket{0}
\frac{1}{q^2}
(-e)
\bra{0} j_{\mu } \ket{e^{+} e^{-}}
\,,
\end{align}
%
where the \(-e\) factor is because of the EM coupling to the photon.
The Breit-Wigner factor looks like
%
\begin{align}
\frac{1}{P^2-M_R^2}
\,,
\end{align}
%
but for the photon we have no mass, therefore we only get a factor \(1/q^2\).

The Feynman diagrams are just a way to collect the Feynman rules needed to compute the process, they are not meant to represent how the process ``looks like''.

Let us take the ultrarelativistic limit, in which the energy of the process is much larger than the muon's mass.
If this is the case, then we can set \(m_e = m_\mu  = 0\).

Let us consider the Dirac equation, in the case in which the mass \(m\) is equal to zero: then we get
%
\begin{align}
i \slashed{\partial} \psi = 0
\,.
\end{align}

Let us use the chiral representation for the \(\gamma \) matrices:
%
\begin{subequations}
\begin{align}
\gamma^{\mu } = \left[\begin{array}{cc}
0 & \sigma^{\mu } \\
\overline{\sigma}^{\mu } & 0
\end{array}\right]
\,,
\end{align}
\end{subequations}
%
where we mean by \(\sigma^{0} = \mathbb{1}\), \(\sigma^{\mu } = (\sigma^{0}, \sigma^{i})\) and \(\overline{\sigma}^{\mu } = (\sigma^{0}, - \sigma^{i})\).

Let us then split the spinor \(\psi \) into
%
\begin{subequations}
\begin{align}
\psi = \left[\begin{array}{c}
\psi_{L} \\
\psi_{R}
\end{array}\right]
\,,
\end{align}
\end{subequations}
%
where \(\psi_{L, R}\) are two-component spinors. This allows us to write two two-dimensional equations:
%
\begin{subequations}
\begin{align}
i \overline{\sigma}^{\mu } \partial_{\mu } \psi_{L} &= 0 \\
i \sigma^{\mu } \partial_{\mu } \psi_{R} &= 0
\,,
\end{align}
\end{subequations}
%
where we get no interaction terms between the two: if we have no mass the equations decouple.

We can do the same thing if the Dirac equation is coupled to the EM field, since the issue is with the structure of the \(\gamma^{\mu }\), it does not matter if we have \(\gamma^{\mu } \DD_{\mu }\) or \(\gamma^{\mu } \partial_{\mu }\); however we will write the decoupled solution for now.

So, for the right-handed spinor we have:
%
\begin{align}
\qty(i \partial_{t} + i \vec{\sigma} \cdot \vec{\partial}) \psi_{R}
\,,
\end{align}
%
which is solved by a plane wave:
%
\begin{align}
\psi_{R} = u_R (p) e^{-iEt + i \vec{p} \cdot \vec{x}}
\,.
\end{align}

Let us suppose the equation reads
%
\begin{subequations}
\begin{align}
\qty(E - p \sigma^{3}) u_R = \left[\begin{array}{cc}
E-p & 0 \\
0 & E+p
\end{array}\right] u_{R} = 0
\,,
\end{align}
\end{subequations}
%
so we must have two solutions: they look like
%
\begin{subequations}
\begin{align}
\psi_{R} = \left[\begin{array}{c}
1 \\
0
\end{array}\right] e^{-i Et + i E x_3 }
\qquad \text{and} \qquad
\psi_{R} = \left[\begin{array}{c}
0 \\
1
\end{array}\right] e^{+i Et + i E x_3 }
\,.
\end{align}
\end{subequations}

The solution \(\psi_{R} \sim \exp(-iEt + i E x_3)\) describes a right-handed electron with spin eigenvalue \(+1/2\) along the direction of motion (this is called the \emph{helicity} \cite[sec.\ 1.4.9]{tissinoTheoreticalPhysicsNotes2020})

On the other hand, the solution \(\psi_{R} \sim \exp(iEt + iE x_3)\) describes a right-handed electron with spin eigenvalue \(s = - 1/2\).

Our quantum field operator \(\psi_{R}\) acts as on the right by destroying a right-handed electron:
%
\begin{align}
\bra{0}\psi_{R} \ket{e^{-}_{R} (p)} = u_R(p) e^{-ipx}
\,.
\end{align}

Then, we can have it acting on the left by destroying a left-handed positron:
%
\begin{align}
\bra{e^{+}_{L}(p)} \psi_{R} \ket{0} = v_L (p) e^{+ipx}
\,.
\end{align}

If we were to repeat the analysis for the other spinor, we would get the specular result.

The Lagrangian can be written as
%
\begin{align}
\mathscr{L} =
\psi_R ^\dag \qty(i \sigma \cdot \partial) \psi_{R}+
\psi_L ^\dag \qty(i \overline{\sigma} \cdot \partial) \psi_{L}
- m \qty( \psi ^\dag _R \psi_{L}
+ \psi ^\dag_L \psi_{R})
\,,
\end{align}
%
so the coupling between the left and right handed fermions depends on the mass, if we are in a situation in which \(T \gg m\) they effectively decouple.

In order to describe this spin, we introduce the helicity quantum number, which is defined as
%
\begin{align}
h = \hat{p} \cdot \vec{s}
\,,
\end{align}
%
the projection of the spin along the direction of motion.
For \(\psi_{R}\), we have the \((1,0)\) state with helicity \(h = 1/2\), while the state \((0,1)\) is a positron with helicity \(h = - 1/2\).

If \(m=0\), then helicity is exactly conserved. At high energies, it is suppressed by a factor \(m / E\).

Let us compute the cross section: we must calculate
%
\begin{align}
\bra{0} j^{\mu } \ket{e^{-}_{R} (p_{-}) e^{+}_{L} (p_+)}
\,,
\end{align}
%
where we have a term \(j^{\mu } = \overline{\psi} \gamma^{\mu } \psi = \psi ^\dag \gamma^{0} \gamma^{\mu } \psi \); the term \(\gamma^{0} \gamma^{\mu }\) reads
%
\begin{align}
\gamma^{0} \gamma^{\mu } = \left[\begin{array}{cc}
0 & \mathbb{1} \\
\mathbb{1} & 0
\end{array}\right]
\left[\begin{array}{cc}
0 & \sigma^{\mu } \\
\overline{\sigma}^{\mu } & 0
\end{array}\right]
= \left[\begin{array}{cc}
\overline{\sigma}^{\mu } & 0 \\
0 & \sigma^{\mu }
\end{array}\right]
\,,
\end{align}
%
so we get
%
\begin{align}
j^{\mu } = \psi_{L} ^\dag \overline{\sigma}^{\mu } \psi_{L} + \psi_{R} ^\dag \sigma^{\mu } \psi_{R}
\,.
\end{align}

We describe the process in the center-of-mass frame, and we choose to align the axes so that the electron and positron have momenta \(p^{\mu } = (E, 0, 0, \pm E)\) respectively (minus for the positron).

The wavefunction \(\psi ^\dag_{R}\) annihilates the positron \(e^{+}_{L}\) yielding a term \(v ^\dag _L (p_+)\), the wavefunction \(\psi_{R}\) annihilates the electron \(e^{-}_{R}\) yielding a term \(u_R (p_-)\).

Then, we are left with
%
\begin{align}
v_L ^\dag (p_+) \sigma^{\mu } u_R (p_-) &= \sqrt{2E}
\left[\begin{array}{cc}
0 & 1
\end{array}\right]
(\mathbb{1}, \vec{\sigma}) \sqrt{2E}
\left[\begin{array}{c}
1 \\
0
\end{array}\right]  \\
&= 2E (0, 1, i, 0)^{\mu }
\,,
\end{align}
%
so if we define the vector \(\vec{\epsilon}_{+} = (\hat{1} + i \hat{2}) / \sqrt{2}\) we can write
%
\begin{align}
\bra{0}
j^{\mu }
\ket{e^{-}_R (p_-) e^{+}_L (p_+)}
= 2 E \sqrt{2} \qty(0, \vec{\epsilon}_{+})^{\mu }
\,,
\end{align}
%
while we would have
%
\begin{align}
\bra{0}
j^{\mu }
\ket{e^{-}_L (p_-) e^{+}_R (p_+)}
= - 2 E \sqrt{2} \qty(0, \vec{\epsilon}_{-})^{\mu }
\,,
\end{align}
%
with \(\vec{\epsilon}_{-} =(\hat{1} + i \hat{2}) / \sqrt{2} \).

On the other hand, the terms \(e_{R}^{-} e_{R}^{+}\) and \(e_{L}^{-} e_{L}^{+}\) do not contribute (in our \(m = 0\) approximation).

The muons are massless fermions as well in our treatment, so we get analogous terms:
%
\begin{align}
\bra{\mu^-_R (p'_-) \mu^+_L (p'_+)} j^{\mu } \ket{0} &= 2E \sqrt{2} \qty(0, \vec{\epsilon}^{\prime *}_+)^{\mu } \\
\bra{\mu^-_L (p'_-) \mu^+_R (p'_+)} j^{\mu } \ket{0} &= - 2E \sqrt{2} \qty(0, \vec{\epsilon}^{\prime *}_-)^{\mu }
\,,
\end{align}
%
so in the end we find
%
\begin{align}
\mathcal{M} (e^{-}_{L} e^{+}_{R} \to \mu^-_R \mu^+_L)
&= - \frac{e^2}{q^2} 2 (2E)^2
\vec{\epsilon}^{\prime *}_{+} \cdot \vec{\epsilon}_{+}  \\
&= - 2 e^2 \vec{\epsilon}^{\prime *}_{+} \cdot \vec{\epsilon}_{+}
\,,
\end{align}
%
since \(q  =2 E\).
The scalar product here depends on the direction of emission of the muons in the center of mass frame, \(\theta \); we find the absolute value \(\abs{\mathcal{M}}^2 = e^{4} (1 \pm \cos \theta )^2\), depending on whether we are looking at an \(LR \to LR\) process or \(LR \to RL\) process. The unpolarized (spin-averaged) differential cross section comes out to be:
%
\begin{align}
\dv{\sigma }{\cos \theta } = \frac{1}{2} \frac{\pi \alpha^2}{2 E_{CM}^2} \qty(1 + \cos^2\theta )
\,,
\end{align}
%
which can be integrated across the sphere to get the total cross section for the process \(e^{-} e^{+} \to \mu^- \mu^+\):
%
\begin{align}
\sigma = \frac{4 \pi }{3} \frac{\alpha^2}{E^2_{CM}}
\,.
\end{align}

We could have guessed the dependence on \(\alpha^2  / E^2_{CM}\), but for the numerical factor we needed to do the full computation.
This is because the cross section is a length square, so it must depend on the inverse square of our only energy parameter, \(E_{CM}\).

Also, the coupling was fixed: we are working in QED, so we only have a coupling constant: \(e\), so we will have terms \(e^2 / 4 \pi = \alpha \) inside of \(\mathcal{M}\), so we will get \(\alpha^2\) inside of \(\abs{\mathcal{M}}^2\).
The \(4 \pi \)s will cancel because of the phase-space angular integrals.

Once we have done this, can we generalize it? suppose we want to compute the cross section \(\sigma (e^{+}e^{-} \to \text{hadrons})\). How could we do it?

We can make a similar kind of reasoning: the process will look like \(e^{-} e^{+} \to q \overline{q}\), and while the coupling for the first vertex in the Feynman diagram will be \(-e\) the one for the second vertex will look like \(Q_q\), the charge of these quarks.
We calculate the unpolarized cross section, counting all the quarks which can be produced at a fixed COM energy: we assume \(E \sim \SI{100}{GeV}\), so all the quarks except for the top are candidates; so the computation goes:
%
\begin{align}
\frac{\sigma (e^{+} e^{-} \to q \overline{q})}{\sigma (e^{+ }e^{-} \to \mu^+ \mu^-)} \approx \sum _{q} Q_q^2 = \underbrace{2 \frac{4}{9} }_{u, c} + \underbrace{3 \frac{1}{9}}_{d, s, b}
= \frac{11}{9}
\,.
\end{align}

In experiments, however, we get a cross section ratio which is \(11/3\), 3 times larger than expected: this indicates that we have a different type of charge, color charge, which means we have a multiplicity of \(3\) for each quark.

We shall see that this is related to certain kinds of internal symmetries of our field theory.

\end{document}


\chapter{Results}
This chapter consists of two main parts. In the first part of the chapter, the results from training models for predicting sex and brain age from brain graphs will be presented. The models were first evaluated using ten-fold cross validation on the training/validation set. Then, a final model was trained and evaluated on the test set. In the second part of the chapter, the saliency maps for these final models will be presented, with the aim of gaining insight into what functional brain networks in the data are related to age and sex differences.

To reliably evaluate the models, the data set was split into a training/validation set and a test set. These data sets where then undersampled to make them unbiased, which yielded training/validation sets of size 30000 and 20000, and test sets of size 4678 and 3148 for sex and age prediction, respectively. For age prediction, an unbiased data set corresponds to a uniform distribution of ages. Model training and evaluation was implemented in \texttt{Python} \cite{python} using \texttt{Keras} \cite{keras} with the \texttt{TensorFlow} \cite{tensorflow} backend. Furthermore, all models where trained using the \texttt{Adam} \cite{adam} optimizer.

\section{Evaluating model performance}
\label{sec:model_pred}
The model performance for both sex and age prediction is presented in the form of the loss and two additional metrics. For sex classification, these metrics are \acrfull{bce} (loss), accuracy and \acrfull{mcc}. For age regression, they are \acrfull{mse} (loss), \acrfull{mae} and Pearson correlation coefficient ($r$). \acrshort{mcc} is defined identically to $r$, but refers to the performance of a binary classifier. An \acrshort{mcc} of +1 thus indicates a perfect prediction, -1 all miss-predicted and 0 randomly guessing.

\subsection{Sex}

To evaluate the model performance for sex classification, the three metrics calculated from cross-validation on the training/validation set are presented in \cref{tab:sex_model_results}. All three metrics indicate that Baseline, GCN and Popencoder have comparable performance, with an accuracy around $79\,\%$. It is also clear that these three models significantly outperform Poptoy regardless of metric. The performance of the final models, evaluated on an external test set, is presented in \cref{tab:sex_final_model_results}. The final models' performance are in line with the cross-validation results in \cref{tab:sex_model_results}, where all metrics are within, or around, one standard deviation. Thus, the performance of the models generalises to external data.
\begin{table}[!htbp]
    \centering
    \caption{\acrfull{bce}, accuracy (in $\%$) and \acrfull{mcc} for each of the four models, evaluated using ten-fold cross validation, with the mean and standard deviation calculated over the ten folds.}
    \begin{tabular}{c|c|c|c}
         & BCE & Accuracy & MCC\\ \hline
        Baseline & $0.450\pm0.008$ & $79.0\pm0.6$ &$0.58\pm 0.01$\\
        GCN &$0.45\pm0.02$ & $79.2\pm0.9$& $0.59\pm0.02$\\
        Poptoy &$0.674\pm 0.006$ & $58\pm1$ &$0.17\pm0.02$\\
        Popencoder &$0.446\pm0.009$& $79.3\pm 0.6$ & $0.59\pm0.01$\\
    \end{tabular}
    \label{tab:sex_model_results}
\end{table}
\begin{table}[!htbp]
    \centering
    \caption{\acrfull{bce}, accuracy (in $\%$) and \acrfull{mcc} for each of the four models evaluated on the test set.}
    \begin{tabular}{c|c|c|c}
         & BCE & Accuracy & MCC\\ \hline
        Baseline & 0.444 & 79.5 &0.59\\
        GCN & 0.43& 80.2 & 0.60 \\
        Poptoy &0.678 &57.4 &0.16\\
        Popencoder & 0.450 & 79.1& 0.59\\
    \end{tabular}
    \label{tab:sex_final_model_results}
\end{table}

The results presented in \cref{tab:sex_model_results} and \cref{tab:sex_final_model_results} have several interesting implications. Observe that there is basically no performance difference between Baseline, GCN and Popencoder, implying that increasing model complexity beyond Baseline is not necessary for classifying sex. Furthermore, the main difference between Popencoder and Baseline and GCN is that Popencoder takes a population graph as input, in addition to the brain graphs for all subjects. One explanation of why including the population graph does not improve performance could be that our chosen similarity measure does not introduce any extra information relevant for sex classification. Since the similarity measure is calculated from each subject's brain graph, it is possible that the information encoded by the similarity measure is only a subset of all the information contained in the individual graphs. Another explanation is that the similarity measure adds some extra information, but that the amount of information is small. In the case of either explanation, the similarity measure does not introduce enough information to improve the prediction of a subject's sex. That the similarity measure is not very informative is further supported by the poor performance of Poptoy, since Poptoy bases its prediction solely on the population graph. However, Poptoy still performs better than random guessing, indicating that some valuable information resides in the population graph.

\subsection{Age}
To evaluate the model performance for age regression, the three metrics calculated from cross-validation are presented in \cref{tab:age_model_results}. From \cref{tab:age_model_results}, the three metrics clearly indicate that, just as for sex classification, Baseline, GCN and Popencoder all perform within the uncertainty of each other, whilst Poptoy performs significantly worse.  \cref{tab:age_final_model_results} presents the performance of the final models trained on all data and evaluated on an external test set. The results are within one standard deviation of the results in \cref{tab:age_model_results}, which indicates that the models generalise well to external data. One possible exception is Popencoder, which performs slightly better on the test set than during cross-validation, however, the difference in performance is small.

\begin{table}[!htbp]
    \centering
    \caption{\acrfull{mse}, \acrfull{mae} and Pearson correlation coefficient ($r$) for each of the four models, evaluated using ten-fold cross validation, with the mean and standard deviation calculated over the ten folds.}
    \begin{tabular}{c|c|c|c}
         &  MSE [years$^2$]& MAE [years] & $r$ \\ \hline
        Baseline &$52\pm1$& $5.9\pm0.1$&$0.52\pm0.01$\\
        GCN & $53\pm1$& $5.96\pm 0.09 $& $0.52\pm0.01$\\
        Poptoy &$71\pm 1$ & $7.24\pm0.07$ &$ 0.11\pm 0.01$\\
        Popencoder &$53\pm1$& $5.93\pm 0.09$ & $0.52\pm0.02$\\
    \end{tabular}
    \label{tab:age_model_results}
\end{table}

The age prediction results for the different models are in line with the two main conclusions for sex classification in the previous section. Firstly, Baseline, GCN and Popencoder perform similarly which indicates that increasing the model complexity beyond Baseline is unnecessary. Secondly, the poor performance of Poptoy compared to the other models, combined with Popencoder not performing better than Baseline and GCN, indicates that the similarity measure is not very informative with regards to age either.

\begin{table}[!htbp]
    \centering
    \caption{\acrfull{mse}, \acrfull{mae} and Pearson correlation coefficient ($r$) for each of the four models evaluated on the test set.}
    \begin{tabular}{c|c|c|c}
         &  MSE [years$^2$]& MAE [years] & $r$ \\ \hline
        Baseline & $51 $& $5.9 $&$0.53 $\\
        GCN & $51 $& $5.9  $& $0.53 $\\
        Poptoy &$71 $ & $7.18 $ &$ 0.09 $\\
        Popencoder &50 & $5.7 $ & $0.55 $\\
    \end{tabular}
    \label{tab:age_final_model_results}
\end{table}

To set the poor performance of Poptoy into perspective, consider a naive age prediction model that always outputs the average age of the population when predicting a subject's age. The performance of such a model on the test set would yield an \acrshort{mse} of $71\rm\,years^2$ and an MAE of $7.3\rm\,years$. The correlation for constant prediction with the actual ages is undefined. Comparing this with the results for Poptoy, one can conclude that Poptoy only performs slightly better, demonstrating Poptoy's poor performance.

Turning to the results on the test set for the three other models, all have an \acrshort{mse} loss of around 50--$51\rm\,years^2$ , an \acrshort{mae} of 5.7--$5.9\rm\,years$ and a correlation of around 0.53--0.55. The fact that the correlation is much lower than 1 indicates that the prediction is not perfect. In fact, it turns out that all these models are somewhat biased in predicting the mean of the age distribution in the data set. This can be seen clearly in \cref{fig:age_regression}, where a prediction with Baseline on the test set is performed. The figure suggests that the model to some extent can determine if a subject is old or young, but that the error in the age prediction is much larger for younger and older subjects than for subjects close to the mean age. This is a form of underfitting, indicating either that the model is not complex or general enough to better fit the data, or that the data does not contain enough information for a better prediction of age.

\begin{figure}[!htbp]
    \centering
    \begin{center}
        \resizebox {0.6\linewidth} {!} {
            \input{chapters/images_results/predict_example.pgf}
        }
    \end{center}
    \caption{A plot of the Baseline predicted ages for the subjects in the test set, versus the target ages. The dots are the predictions for individual subjects, the orange line is a linear fit to the individual predictions, and the black dashed line is what the perfect predictions (no error) would look like. Note that the error in the prediction is the largest for the youngest and the oldest subjects.}
    \label{fig:age_regression}
\end{figure}

\section{Saliency maps of functional brain networks}
The saliency mapping consisted of two methods: naive node removal and Zorro; both applied for sex and age prediction on Baseline and GCN. Poptoy was not analysed because of its low performance, and Popencoder because of its high complexity. Including Popencoder would probably also be redundant, because of its similar performance to Baseline and GCN.

Naive node removal was performed with the difference in loss ($\Delta$\acrshort{bce} for sex prediction and $\Delta$\acrshort{mse} for age prediction) evaluated on the test set. The naive analysis was repeated ten times with different model initialisations to estimate the impact of model uncertainty on node importance. Zorro was performed only for the final models presented in \cref{sec:model_pred}, and was run with a fidelity threshold of $\tau=0.9$. The tolerance for an age prediction to be considered correct was set to be similar to the MAE of the final models, at $t=6\rm\,years$. The results for all subjects in the test set were aggregated into groups of 200 subjects, and the mean importance score for each node in each group was calculated. Then, the average and standard deviation over the importance scores in each group was calculated. The standard deviations of the Zorro results over these sub-groups represent the uncertainty in the importance for each node when varying subjects. Ideally, Zorro should also be evaluated over different model intialisations. However, it would require repeating Zorro evaluated on all subjects in the test set for several different models. Due to the computational complexity of Zorro, this was not possible because of time constraints. A smaller investigation into the model uncertainty for Zorro was performed for a few subjects, presented in \cref{app:zorro_model_uncertainty}, from which it was concluded that the model uncertainty is similar, but generally smaller than the subject uncertainty.

\subsection{Sex}
\label{sec:results_analysis_sex}
As a measure of node importance, $\Delta$\acrshort{bce} when performing naive node removal for Baseline and GCN is presented in \cref{fig:naive_sex}.

\begin{figure}[!htbp]
    \centering
    \begin{center}
    \resizebox {0.7\linewidth} {!} {
        \input{chapters/images_results/node_masking/shared_x_sex.pgf}
    }
    \end{center}
    \caption{Results from performing the naive node removal analysis for Baseline and GCN, for sex prediction. The analysis was repeated for ten different model initialisation, over which the dots and error bars in the figures represent the mean and standard deviation, respectively.}
    \label{fig:naive_sex}
\end{figure}

From the figures it is observed that the effect of removing a node for both models is on the order of $\Delta \text{BCE} \sim 0.01$, which is small compared to the absolute performance of the reference models, $\text{BCE} \approx 0.45$. It is also observed that removing any node has a negative effect on performance, $\Delta\text{BCE}>0$. These two observations indicate two things. Firstly, no node seems to be crucial for the prediction, since the change in performance is small for all nodes. Secondly, all nodes are to some extent important, since removing any node has a negative impact on the performance. Despite the small absolute change in performance, there are clear differences in the relative importance between nodes. The results for both models indicates that \acrshort{smm}, \acrshort{cb2}, \acrshort{pl} and \acrshort{pmc} are more important than the other nodes. Further, observe that the uncertainties are much larger for GCN than for Baseline. This could be due to GCN not converging to the same degree as Baseline, either due to overfitting, early stopping or because of it being a more complex model. The two models, however, give roughly the same result, even if the uncertainties for GCN are large.

\begin{figure}[!htbp]
    \centering
    \begin{center}
        \resizebox {0.7\linewidth} {!} {
            \input{chapters/images_results/zorro/shared_x_sex.pgf}
        }
    \end{center}
    \caption{Zorro analysis results for the Baseline and GCN models. The analysis results were grouped into 23 different groups of 200 subjects for each model, to yield a mean and standard deviation in importance for each node.}
    \label{fig:zorro_sex}
\end{figure}

The result from the Zorro analysis for Baseline and GCN is presented in \cref{fig:zorro_sex}. The uncertainties in the result for both models are small, but note that they do not include potential uncertainties regarding the model variability, as previously discussed. Generally, it is clear that the results for Baseline and GCN are to a large extent in agreement: for both models \acrshort{smm} is pointed out to be the most important node. Other nodes that may be regarded to be somewhat important according to both models are \acrshort{cb2}, \acrshort{pl}, \acrshort{ts} and \acrshort{pmc}. It is also interesting to note that \acrshort{vv1m} seems to be more important when analysing Baseline than GCN. One possible interpretation could be that this is an artefact of the method, but this inconsistency will be discussed more in-depth in \cref{chap:discussion}.

\begin{figure}[H]
    \centering
    \begin{center}
    \resizebox {0.7\linewidth} {!} {
        \input{chapters/images_results/thesis_naive_zorro_sex.pgf}
    }
    \end{center}
    \caption{Comparison of the results for naive node removal and Zorro for sex prediction, from \cref{fig:naive_sex} and \cref{fig:zorro_sex}, respectively. Note that the error bars are omitted for visibility.}
    \label{fig:comparison_sex}
\end{figure}

To more easily compare the result of naive node removal and Zorro for both models, \cref{fig:comparison_sex} is presented, without error bars for visibility reasons. The comparison of the result reveal that the methods are generally in agreement, but some clear differences exist. For instance, both methods agree that \acrshort{smm} is important but disagree on the degree of importance for \acrshort{cb2} and \acrshort{pl}. By comparing the methods and models, \acrshort{smm} seems to be most important node for classifying sex, and \acrshort{cb2}, \acrshort{pl}, \acrshort{ts} and \acrshort{pmc} may to some extent be important.

\subsection{Age}

As a measure of node importance, $\Delta$\acrshort{mse} when performing naive node removal for Baseline and GCN is presented in \cref{fig:naive_age}.

\begin{figure}[!htbp]
    \centering
    \begin{center}
        \resizebox {0.7\linewidth} {!} {
            \input{chapters/images_results/node_masking/shared_x_age.pgf}
        }
    \end{center}
    \caption{Results from performing the naive node removal analysis for Baseline and GCN, for age prediction. The analysis was repeated for ten different model initialisation, over which the dots and error bars in the figures represent the mean and standard deviation, respectively.}
    \label{fig:naive_age}
\end{figure}

The general change in loss is observed to be small, $\Delta\text{MSE}\sim1\rm\,years^2$ relative to $\text{MSE}\sim50\rm\,years^2$. As was the case for sex prediction, this indicates that no node is crucial and that all nodes are to some extent important for predicting age. Furthermore, the model uncertainty is larger for GCN than for Baseline in the case of age prediction as well. This could be due to GCN not fully converging, as discussed in \cref{sec:results_analysis_sex}. Observe that the most important nodes for both models are \acrshort{smm}, \acrshort{cb2} and \acrshort{pmc}, where \acrshort{cb1} is additionally important for Baseline. Overall, the models are generally in agreement with some small exceptions.

\begin{figure}[!htbp]
    \centering
    \begin{center}
    \resizebox {0.7\linewidth} {!} {
        \input{chapters/images_results/zorro/shared_x_age.pgf}
    }
    \end{center}
    \caption{Zorro analysis results for the Baseline and GCN models for age prediction. The analysis results were grouped into 15 different groups of 200 subjects for each model, to yield a mean and standard deviation in importance for each node.}
    \label{fig:zorro_age}
\end{figure}

The result from the Zorro analysis for Baseline and GCN is presented in \cref{fig:zorro_age}. Observe that the algorithm finds \acrshort{cb1}, \acrshort{dmn}, \acrshort{smm}, \acrshort{sn}, \acrshort{cb2} and \acrshort{pl} important for Baseline, and \acrshort{smm} and \acrshort{cb2} important for GCN. Another observation is that generally the importance scores for Baseline are higher than for GCN, especially for \acrshort{cb1}, \acrshort{dmn} and \acrshort{sn}. This means that more nodes are required in the explanations for Baseline than for GCN in order to reach a fidelity of $\tau=0.9$.

\begin{figure}[H]
    \centering
    \begin{center}
    \resizebox {0.7\linewidth} {!} {
        \input{chapters/images_results/thesis_naive_zorro_age.pgf}
    }
    \end{center}
    \caption{Comparison of the results for naive node removal and Zorro for age prediction, in \cref{fig:naive_age} and \cref{fig:zorro_age} respectively. Note that the error bars are omitted for visibility.}
    \label{fig:comparison_age}
\end{figure}

In order to more easily compare the result for the naive node removal and Zorro for both models, \cref{fig:comparison_age} is presented. By comparing the results for both methods and models, \acrshort{smm} and \acrshort{cb2} stand out, since they are deemed important in all cases. In addition to \acrshort{smm} and \acrshort{cb2}, other nodes that might be important, but not consistently for all methods and models, are \acrshort{cb1}, \acrshort{dmn}, \acrshort{sn}, \acrshort{pl} and \acrshort{pmc}. Most of these are nodes that are only considered important by Zorro for the Baseline model. However, since they are only deemed important in one out of the four cases, it might suggest that they are artefacts of the method or model.
There are also some differences in the results for naive node removal compared with Zorro. For example, \acrshort{pmc} may be deemed more important by the naive method. However, the differences between the two analysis methods seem to be smaller than the discrepancy between Baseline and GCN for Zorro. These differences and discrepancies will be discussed in more detail in \cref{chap:discussion}.


\section{High energy physics applications}
\label{sec:hep}

\subsection{B physics}

\subsubsection{Data sample}

In order to demonstrate the functionality of the toolkit, data samples generated
from the RapidSim package~\cite{rapid} are used. The interesting signal is chosen
to be the $\Bs\to\jpsi(\to\mu\mu )\phi (\to\PK\PK )$ decay, and the background is
the $\Dz\to\pi\pi\pi\pi$ decay. A total of 10000 candidates is generated for each decay.

\subsubsection{Training of the original classifier}
\label{sec:orig_training}

%The machine learning classifier chosen is the Multi-layer perceptron of SciKit-Learn,
%which is constructed as
The machine learning classifier, using the Keras framework~\cite{keras},
is constructed as
which is constructed as
\begin{lstlisting}
classifier = Sequential()
classifier.add(LocallyConnected1D(
filters = 90, kernel_size = 2,
activation = 'sigmoid',
input_shape = (len(setTrain[0]), 1)))
classifier.add(GlobalMaxPooling1D())
classifier.add(Dense(30, activation = 'sigmoid'))
classifier.add(Dense(1, activation = 'sigmoid'))
classifier.compile(optimizer = 'adam',
loss = 'binary_crossentropy'
, metrics = ['accuracy'])
\end{lstlisting}
%\begin{lstlisting}
%classifier = MLPClassifier(activation='relu',
%    batch_size='auto', beta_1=0.9, beta_2=0.999,
%    early_stopping=False, epsilon=1e-08,
%    hidden_layer_sizes=(3, 3),
%    learning_rate='constant',
%    learning_rate_init=0.001, max_iter=200,
%    nesterovs_momentum=True, power_t=0.5,
%    random_state=1, shuffle=True,
%    solver='lbfgs', tol=0.0001, momentum=0.9,
%    validation_fraction=0.1, verbose=False,
%    warm_start=False, alpha=1e-05)
%\end{lstlisting}

The neural network is trained using kinematic properties of the respective decays.
These include the pseudorapidity, $\eta$, and momentum transverse to the direction of the
input proton beams, \pt, of the decaying particle. In addition, the minimum and maximum \pt and $\eta$
of the final state particles is used. The signal and background distributions of the input variables
are shown in Fig.~\ref{fig:inputs}.
%
\begin{figure*}[t]
\centering
\includegraphics[width=0.33\textwidth]{pt_comp}
\includegraphics[width=0.33\textwidth]{eta_comp}
\includegraphics[width=0.33\textwidth]{minpt_comp}
\includegraphics[width=0.33\textwidth]{maxpt_comp}
\includegraphics[width=0.33\textwidth]{mineta_comp}
\includegraphics[width=0.33\textwidth]{maxeta_comp}
\caption{\small Comparison of the signal and background distributions
used to train the Keras B decay classifier.}
\label{fig:inputs}
\end{figure*}

In the training of the original classifier, half of the data is
reserved in order to test for overtraining.
%The output probability distributions of the signal and background samples
%after the training are shown in Fig.~\ref{fig:output}.
%It can be seen that the test and training samples are in good agreement,
%showing that the original SciKit-Learn classifier is not significantly overtrained.
%\begin{figure*}[t]
%\centering
%\includegraphics[width=0.45\textwidth]{event_probability}
%\caption{\small
%Output distributions of the signal and background training and
%test samples from the classifier after training.
%}
%\label{fig:output}
%\end{figure*}

\subsection{Jet separation}
\label{sec:hepGPD}

\subsubsection{Data sample}

A further demonstration is provided demonstrating a classifiers ability to separate different
kinds of jets. The data sample to show this has been generated from Pythia~\cite{Sjostrand:2007gs}
simulating pp collisions at 14\tev.
The jets themselves are reconstructed in the Rivet analysis framework~\cite{Buckley:2010ar}
and are created using the FastJet~\cite{Cacciari:2011ma} package using the $K_t$ algorithm~\cite{Salam:2007xv}
(the definition
of the $K_t$ variable and a review of jet reconstruction algorithms
may be found in Ref.~\cite{Atkin:2015msa}).
A jet \pt requirement of 20\gev is imposed on all jets.
All other parameters remain at the default values for Rivet version 2.5.4.
The signal sample is chosen to correspond to a $qg\to qg$ type of interaction,
whereas the background is chosen to correspond to a $gg \to gg$ type.
Jets that originate from gluons in the final state form a background to many
analyses, therefore efficient rejection of such processes is important in making
measurements~\cite{Komiske:2016rsd}.

\subsubsection{Training of the original classifier}

The machine learning classifier chosen is also a Keras-based convolutional neural net,
constructed in an similar way as described in Sec~\ref{sec:orig_training}.
\begin{lstlisting}
classifier = Sequential()
classifier.add(LocallyConnected1D(
filters = 32, kernel_size = 2,
activation = 'relu', input_shape = sig_data[0].shape))
classifier.add(MaxPooling1D(pool_size = 3,
strides = 1))
classifier.add(Dropout(0.25))
classifier.add(Conv1D(filters = 32, kernel_size = 3,
activation = 'relu'))
classifier.add(MaxPooling1D(pool_size = 2,
strides = 2))
classifier.add(Dropout(0.25))
classifier.add(Conv1D(filters = 32, kernel_size = 2,
activation = 'relu'))
classifier.add(MaxPooling1D(pool_size = 2,
strides = 2))
classifier.add(Dropout(0.5))
classifier.add(Flatten())
classifier.add(Dense(50, activation = 'relu'))
classifier.add(Dense(1, activation = 'sigmoid'))
classifier.compile(optimizer = 'adam',
loss = 'binary_crossentropy'
, metrics = ['accuracy'])
earlystop = EarlyStopping(patience = 3)
model.fit(setTrain, labels, batch_size = batchSize,
epochs = epochNum, validation_data = (setTest, labels),
callbacks = [earlystop])
\end{lstlisting}

The training data is prepared as described in Sec. 3.1 of~\cite{Komiske:2016rsd}. Four images
in two dimensions (azimuthal angle, $\phi$, and rapidity, $\eta$) are created from the multiplicity and
transverse energy of charged and neutral particles. The resulting images are centred and
cropped in a region $\eta$, $\phi$ $\in (-0.4, 0.4)$. Finally the images are normalised
(pixel intensities sum to 1, $\sum_{ij} I_{ij} = 1$), zero-centred (normalised mean subtracted
from pixel intensity, $I_{ij}^{'} = I_{ij} - \mu_{ij}$) and standardised (divide pixel intensity
by the standard deviation, $I^{''}_{ij} = I^{'}_{ij} / (\sigma_{ij} + r)$, $r = 10^-5$).
Finally, a further step is added where the images are projected in two 1-D projections each and
four channels are considered: charged \& neutral particle transverse energy and charged \& neutral
particle multiplicity. The resulting 1-D feature vector is appended with some
total kinematic properties such as the $K_t$ of the jet, its momentum, energy, mass,
multiplicity, etc. - producing a total of 140 individual features.
% The neural network is trained using 4 jet properties consisting of the energy,
% the combined mass of the particles in the jet, the pseudorapidity, and the jet $K_t$.
The signal and background distributions of the input variables
are shown in Fig.~\ref{fig:inputsGPD}.
%
\begin{figure*}[t]
\centering
\includegraphics[width=0.33\textwidth]{et_comp_gpd}
\includegraphics[width=0.33\textwidth]{eta_comp_gpd}
\includegraphics[width=0.33\textwidth]{m_comp_gpd}
\includegraphics[width=0.33\textwidth]{kt_comp_gpd}
\caption{\small Comparison of the signal and background distributions
used to train the Keras classifier .}
\label{fig:inputsGPD}
\end{figure*}

\subsection{Drone conversions}

The drone neural networks are trained following the procedure outlined in Sec.~\ref{sec:dlearn},
In total, 1500 epochs are used with
the learning rate of the stochastic gradient descent set to 0.05.
The value of $\kappa$ is chosen to be 0.01.

The loss history of the drone approximations are shown in Fig.~\ref{fig:loss}
as a function of epoch number.
The convergence is also shown in Fig.~\ref{fig:iterdiff}, which shows
the difference in the value of the loss function with respect to the previous
epoch. The epochs that trigger an increase in the number of hyperparameters
are also overlaid.
In total for the case of B decays, an increase was triggered 38 times compared to 67 times for the
jet separation classifier. The total number
of parameters in the final drone neural networks are therefore 302 and 10152 for the B decay drone
and the jet separation drone, respectively. It is interesting
to note that with the algorithm design of Sec.~\ref{sec:dlearn}, the introduction
of the new parameter space causes the drone networks to learn faster, as evidenced by
increases in Fig.~\ref{fig:iterdiff} with continuing descent of the loss functions.
%
The performance of the original classifiers compared to the drone classifiers are shown in Figure~\ref{fig:roc}.
\begin{figure*}[t]
\centering
\includegraphics[width=0.45\textwidth]{loss_history}
\includegraphics[width=0.45\textwidth]{loss_history_gpd}
\caption{\small
Convergence of the loss function during the drone training
  for the case of the B
  decay (left) and jet separation (right) examples.
}
\label{fig:loss}
\end{figure*}
\begin{figure*}[t]
\centering
\includegraphics[width=0.45\textwidth]{diff_history}
\includegraphics[width=0.45\textwidth]{diff_history_gpd}
\caption{\small
Difference in the loss function with respect to the previous iteration
  for the case of the B
  decay (left) and jet separation (right) examples.
  The green triangles
depict the epoch number in which the number of hyperperameters was increased.
}
\label{fig:iterdiff}
\end{figure*}
\begin{figure*}[t]
\centering
\includegraphics[width=0.45\textwidth]{roc}
\includegraphics[width=0.45\textwidth]{roc_gpd}
\caption{\small
  Signal efficiency versus background rejection of the original classifier (red) and drone
  approximation (blue)
  for the case of the B
  decay (left) and jet separation (right) examples.
}
\label{fig:roc}
\end{figure*}

\section{Drone storage and transferability and suitability
for low-latency environments}
\label{sec:storage}

The hyperparameters and structure of the drone are required to be
portable and easily stored for later usage. For this the {\tt JSON} format was chosen as
mediator. It is human-readable and easily accessible in the {\tt Python} and {\tt C++}
environments commonly used in HEP. Thus, it is readily deployable in both personal and production environments.

Provided is a tool to export and save a drone neural network to a {\tt JSON}
formatted file which preserves the input \& output structure,
the layers and nodes, all hyperparameters and activation functions.
The drone configuration is later read in by an equivalent tool into the production software framework,
which then constructs a class object based on the Keras model. The {\tt C++} class implements
a flexible member structure that is capable of completely reproducing the original drone. The production
implementation may be used for all data reduction levels, be it in the form of a low-latency trigger
for example up to the latest stages of data handling and output.

A major advantage of this method is that analysts and users have the full freedom of latest developments
of industry standards, but need only to support a more manageable implementation in the low-latency
software. This is further aided by projects such as ONNX~\cite{ONNX}, which enable classifiers from a wider
range of software packages to be converted to a framework in which an approximation converter
is available.

The identical performance show in Fig.~\ref{fig:roc} is clearly the ideal scenario, even though
such good agreement is not always required to give better results than other low-latency methods.
However it is worth noting that the drones created in the examples of Sec.~\ref{sec:hep} are faster to
evaluate. The comparison of the time taken for each model evaluation, determined from a desktop
using a Intel Core i7-4770 processor is shown in Table~\ref{tab:comp}.
\begin{table}[t]
  \centering
  \caption{Hyperparameter number comparisons of the original models and drone
  approximations for the HEP examples. \label{tab:comp_param}}
  \begin{tabular}{l|rr}
                   & original model                  & drone \\
    \hline
    B decay        & 4,111 & 302 \\
    jet separation & 71,429 & 10152 \\
  \end{tabular}
\end{table}

\begin{table}[t]
  \centering
  \caption{Processing time comparisons of the original models and drone
  approximations for the HEP examples. \label{tab:comp}}
  \begin{tabular}{l|rr}
                   & original model                  & drone \\
    \hline
    B decay        & $19.3 \pm 0.2 \times 10^{-5}$ s & $2.7 \pm 0.2 \times 10^{-5}$ s \\
    jet separation &  $3.2 \pm 0.2 \times 10^{-3}$ s & $4.3 \pm 0.2 \times 10^{-4}$ s \\
  \end{tabular}
\end{table}


\documentclass{revtex4-2}

\usepackage{amsmath}
\usepackage{amsbsy}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{bm,ulem,color}
\usepackage{natbib}

\include{gyrokinetics-macros}
\include{macros}

\usepackage[colorlinks=true]{hyperref}
\providecommand{\pitens}{\tensor{\pi}}
\begin{document}

\date{\today}

\title{\mctrans{} Reference Manual}
\author{Ian G. Abel}

\maketitle
\section{Introduction}

\mctrans{} is the scoping tool used by the CMFX project and others for designing centrifugal magnetic mirrors.

\section{\mctrans{}: A User's Guide}

\mctrans{} is driven from a configuration file. This file is written in the \href{https://github.com/toml-lang/toml}{TOML} language. This language endeavours
to be transparent and easy to use. The configuration file is broken up into blocks. ARRANGE THE BLOCKS (or finish writing this manual).

\section{The Physics Model of \mctrans{}}

\mctrans{} solves simplified transport equations for the centrifugally-confined plasma. The underlying models are all based on the assumption that the plasma is well-confined and that the thermal Mach number is large compared to one.

In many places we use formulae straight from the NRL Plasma Formulary.

\subsection{Fundamental Equations}

As with any transport solver, \mctrans{} solves equations for the fluid-like conserved quantities -- particles, energy, and momentum.
We work in the usual $(R,\tor,Z)$ cylindrical coordinate system.
The magnetic field lies purely in the $R-Z$ plane,\footnote{Estimates of ripple / mis-alignment induced transport can be computed, but it is currently out of scope for \mctrans{}.}
and is given by
\begin{equation}
\bm{B} = \grad\psi\times\grad \tor,
\end{equation}
where $\psi$ is the poloidal flux function (proportional to the toroidal component of the vector potential).
The electric field is given by
\begin{equation}
\bm{E} = -\grad \psi \frac{d \Phi}{d\psi} - \grad \pot,
\end{equation}
where we have split off the dominant radial electric field into the first term (which gives rise to the sonic rotation) and put all other electric field variation into the second term. Estimating the size of the two terms, we see that
\begin{equation}
\Phi \sim \frac{a M T_e}{e \rho_i} \gg \pot \sim \frac{T_e}{e},
\end{equation}
where $a$ is a typical radial scale length, $M$ the thermal Mach number, and $\rho_i$ the thermal ion Larmor radius.

We assume that the flow velocity $\bm{u}$ is the same for all species and given by
\begin{equation}
\bm{u} = \omega R^2 \grad\tor,
\end{equation}
where $\omega$ is the toroidal angular velocity. We also assume that the angular velocity is only a function of flux-surface-label $\psi$.

The underlying transport equations are thus:
\begin{eqnarray}
\label{parttrans}
\frac{d n_s}{dt} + \dv\bm{\Gamma}_s &=& S_{n\,s}\\
		\label{heattrans}
\frac{d}{dt} \left( \frac{3}{2} n_s T_s \right) + \dv\bm{q}_s &=& \left(\grad\psi \cdot \pitens \cdot \grad\tor\right) R^2 \frac{d\omega}{d \psi}   + Q_s + S_{E\,s}\\
	\label{momtrans}
\frac{d \omega}{dt} + \dv\left(\pitens\cdot R^2\grad\tor\right) &=& \bm{j} \times\bm{B} \cdot R^2\grad\tor + S_{\omega}.
\end{eqnarray}
In these equations the transport fluxes $\bm{\Gamma}_s$ and $\bm{q}_s$ are the particle and heat fluxes of each species, and the species-summed momentum flux tensor is denoted by $\pitens$. We have also included arbitrary sources of particles $S_{n\,s}$, energy $S_{E\,s}$, and angular momentum $S_{\omega\,s}$; these source terms will be used to account for collisionless parallel losses and energy sources such as alpha-particle heating.

Currently, \mctrans{} does not solve all these equations. In fact, we only solve for the transport of heat. The particle transport equation is assumed to contain a
source that is feedback controlled to maintain the electron density at a fixed value. This restiction may be lifted at a later date.

The momentum transport equation is more interesting. We know that the angular velocity is driven by $\bm{E}\times\bm{B}$ rotation, and so is given by
\begin{equation}
\omega = - \frac{d \Phi}{d\psi},
\end{equation}
where the effect of $\pot$ in $\bm{E}$ is small and can be neglected.  Due to the electrical configuration of a centrifugal mirror (see figure) we often
wish to consider the behaviour of a centrifugal plasma given a fixed input voltage. In this case, the momentum transport equation becomes an equation to determine
the radial current drawn from the power supply in terms of other quantities. We never need to solve \eref{momtrans} for $\omega$ in this setup. If we instead held the input power or current fixed then \eref{momtrans} would be solved as normal.

In steady-state operation, \mctrans{} sets the time derivatives to zero and solves the ensuing nonlinear algebraic equations to balance heat generation and heat losses.
In the following subsections we will explain the approximations used to calculate those heat losses explicitly in terms of the system state.

\subsection{Approximations to the Magnetic Geometry}
The simplest, and most transparent, geometric approximation is the ``square well'' model. In this model we assume the field lines to be straight, directed in the $Z$ direction, with a step-function shape and a step function in field strength. We demonstrate this in \Figref{squarewellplot}.
\begin{figure}
\includegraphics{SquareWell.pdf}
\caption{An example plot of field lines and the square-well approximation to the central field line}
\label{squarewellplot}
\end{figure}

\subsection{The Centrifugal Potential}

Many results have been derived for confinement in mirror machines which possess an electrostatic potential that varies along the field line. We can make use of these results by noting the following fact: the potential energy of a charged particle on a rotating field line at radius $R$ with angular velocity $\omega$ is
\begin{equation}
\Xi_s = Z_s e \pot - \frac{m_s}{2} \omega^2 R^2.
\end{equation}
We can thus reuse results from existing papers simply by making the substitution $Z_s e\pot \rightarrow \Xi_s$.

Physically, this electrostatic potential exists to keep the electrons (which are light and barely affected by the centrifugal force) next to the ions which are pushed to regions of large $R$ by the centrifugal force.
Hence, the potential $\pot$ has to be solved for by insisting that the plasma is quasineutral along field lines (and that the loss rate is ambipolar).
If we assume that the plasma rotates at a large Mach number $M \gg 1$, then the plasma is well-confined and the confinement time is long compared to the collision time (this can be checked \textit{a posteriori}). In such a situation the plasma is locally Maxwellian (equivalently it is in LTE) and we can write the density of species $s$ as~\cite{catto:2784,flowtome1}:
\begin{equation}
n_s = N_s(\psi) \exp\left( - \frac{\Xi_s}{T_s} \right).
\label{confinedDensity}
\end{equation}
If we now insist that the plasma is made up of ions (mass $m_i$ and charge $Z_i e$) and electrons (mass $m_e$ and charge $-e$) then quasineutrality reads
\begin{equation}
Z_i N_i \exp\left( - \frac{Z_i e\pot}{T_i} + \frac{m_i}{2T_i} \omega^2 R^2 \right) = N_e \exp\left( \frac{e\pot}{T_e} + \frac{m_e}{2T_e} \omega^2 R^2 \right).
\end{equation}
Without loss of generality, we can pick a baseline for $\pot$ such that $Z_i N_i = N_e$ (to see this, average along a field line, use the fact that neither $N_s$ nor $T_s$ varies along the field line). Furthermore, by neglecting the term containing the electron mass, we can solve the resulting equation for $\pot$:
\begin{equation}
\pot = \left( \frac{Z_i e}{T_i} + \frac{e}{T_e}\right)^{-1} \frac{m_i}{2 T_i} \omega^2 R^2,
\end{equation}
up to a possible constant offset. It is clear that this potential is $\Or(M^2T_e/e)$ and is, in fact, the leading order term in an asymptotic series in $M^{-1}$.\footnote{In computing the densities in \eref{confinedDensity}, we have integrated over a full Maxwellian distribution, neglecting the fact that some small number of high-energy particles are in fact lost alongt he field line. This is a consistent approximation as we have determined that the potential barrier is $\Or(M^2T_e)$, which to leading order is effectively infinite.}
To compute the next-order terms in this series we need to know about lost particles and hence parallel transport. This is tackled in the next section. We end with a convenient expression for the potential drop from the centre of a flux surface (at $R = R_{max}$) in terms of suitably normalized variables:

\begin{equation}
\frac{e \pot}{T_e} = \left( \frac{Z_i}{\tau} + 1 \right)^{-1} \frac{M^2}{2} \left( \frac{R^2}{R_{\mathrm{max}}^2} - 1 \right) + \Or(1),
\end{equation}
where we let $\tau = T_i/T_e$ be the temperature ratio, and we have defined the sonic Mach number $M = \omega R_{max} / \cs$ in terms of the sound speed $\cs^2 = T_e / m_i$.\footnote{This is not the speed at which sound waves propagate in a warm plasma, but provides a very convenient normalization. It is the cold-ion limit of the sound speed, and we will continue to call it the sound speed despite this abuse of terminology.}
This is only the leading-order term in a $M \gg 1$ expansion, and so we collect all higher-order terms and denote them by $\pot_0$.
Note that if $Z_i = \tau = 1$ then we get the usual $M^2/4$ scaling for the potential drop.
It is also useful to note that, as a consequence of flux conservation
	\begin{equation}
	\frac{B_{\mathrm{min}}}{B_{\mathrm{max}}} = \left(\frac{R_{\mathrm{max}}}{R_{\mathrm{min}}}\right)^2,
\end{equation}
and so we can relate the ratio of the radius of the flux surface at throat and in the central cell to the ``Mirror Ratio'' given by the ratio of magnetic field strengths.

For electrons, the only term in the potential energy is the electrostatic potential:
\begin{equation}
\Xi_e = \left( \frac{Z_i}{\tau} + 1 \right)^{-1} \frac{M^2}{2} T_e \left( 1 - \frac{R^2}{R_{\mathrm{max}}^2} \right) - e \phi_0,
\end{equation}
but for ions we need to include the centrifugal potential to obtain
\begin{equation}
\Xi_i = \left( \frac{Z_i}{\tau} + 1 \right)^{-1} \frac{M^2}{2} T_i \left( 1 - \frac{R^2}{R_{\mathrm{max}}^2} \right) + Z_i e \phi_0,
\end{equation}
where we have picked the constant offset of $\pot$ such that $\Xi_i = \Xi_e = 0$ at the midplane ($Z=0$, $R=R_{\mathrm{max}}$). Again, $\pot_0$ is the higher-order part of $\pot$ that must be determined by evaluating the parallel losses.

\textbf{N.B. In contrast to a tandem mirror, where the only confining potential is electric, the addition of the centrifugal term allows the
	potential to be confining for \textit{both} the species.}

\subsection{Parallel Transport}

We assume that the plasma is hot enough to be in the collisionless regime where the particle bounce time (inside the potential well formed by the centrifugal force) is extremely short compared to the particle collision time. This is manifestly true in reactor-grade plasmas ($\left.\nu_{ii} L_\parallel \right/ \vth \sim 10^{-5}$ or smaller) but is even valid for warm plasmas above a few hundred electron Volts in temperature. The collisionality parameter is reported and if it is not much less than one the results of \mctrans{} are not valid.

In this collisionless regime we use formulae that are derived in the manner originally used by Pastukhov~\cite{Pastukhov1974} for the case of a tandem mirror with an electron-confining electrostatic potential. Pastukhov originally derived his results for electrons alone. We need the result for a multispecies plasma.
We can find this result in \citet{CattoBernsteinMirror1} by taking the square-well limit of (40) of that work to obtain the particle loss rate in our notation:
\begin{equation}
\left(\pd{n_s}{t}\right)_{\mathrm{End Losses}} =
	- \left( \frac{2 n_s \Sigma}{\sqrt{\pi}} \right) \nu_s \frac{1}{\ln\left( R_{\mathrm{mirror}} \Sigma\right)} \frac{\exp\left( -\Xi_s/T_s \right)}{\Xi_s/T_s},
	\label{ParticleLossRate}
\end{equation}
where $\Sigma = Z_i + 1$ for electrons and $\Sigma = 1$ for ions, and $\nu_s$ is the appropriate collision frequency for species $s$. For electrons this is the combination of electron-electron and electron-ion collisions. For ions this is just the ion-ion collision frequency.

Note that this equation only agrees with the results of \citet{Pastukhov1974} and \citet{cohen1978collisional} in the limit of $R_{\mathrm{mirror}} \rightarrow \infty$. The error induced by not knowing this prefactor accurately is much smaller than the approximation by a square well, and is comparable with the effect of several other approximations made in the analytic work.

We anticipate upgrading \mctrans{} to use the full formulae of \citet{CattoBernsteinMirror1} in the near future, thereby including some effect of the actual magnetic geometry.

This particle loss rate can be used to compute heat losses by multiplying by $\Xi_s$ -- the energy loss is dominated by energetic particles, nullifying the extra power of $\Xi_s$ in the denominator of \eref{ParticleLossRate}. Similarly, loss of toroidal angular momentum can be computed by multiplying the particle loss rate by the angular momentum lost per ion (electrons carrying negligible momentum).

\subsubsection{Ambipolar Parallel Losses and Solving for $\pot$}
In the formula \eref{ParticleLossRate} for the losses we see that $\Xi_s$ appears in the exponential. The leading order part of $\Xi_s$ is $\Or(M^2 T_s)$, so this exponential is what strongly suppresses the collisional loss rate. Expanding this exponential schematically we have
\begin{equation}
\exp\left( -\frac{\Xi_s}{T_s} \right) \approx \exp\left[ - (\dots) M^2 \right] \exp\left( -Z_s e \pot_0 / T_s \right),
\end{equation}
and we see that even though $\pot_0$ is small compared to the leading-order part of the potential it has an $\Or(1)$ effect on the loss rate and must be accounted for.

We find $\pot_0$ by equating the electron and ion loss rates along the field line to enforce zero net charge loss along the field line. \textbf{N.B. This part of the code can be a little tempremental, and if you find a case that doesn't work it may be because you're starting to search for an equilibrium from a starting point that is so poorly confined that quasineutrality cannot be satisfied within the bounds that the code is searching.}

\subsection{Perpendicular Transport}

To completely evaluate the heat transport equations we need expressions for $\bm{q}_s$ and $\pitens$.
We consider only the classical collisional contribution to these transport fluxes. Turbulent transport should be fully suppressed by the flow shear.

We handle the heat flux first.
From (2.14) of \citet{braginskii1965tpp} the collisional ion heat flux in a strongly-magnetized plasma is
\begin{equation}
q_i = -\chi_{i\parallel} \bm{b}\bm{b}\dg T_i - \chi_{i\perp} \grad_\perp T_i + \frac{5}{2} \frac{n_i T_i}{m_i \cycfreq[i]} \bm{b}\times\grad T_i.
\end{equation}
Now, in the collisionless limit, $T_i = T_i(\psi)$ and so the first term vanishes, and the third term is purely toroidal. Thus, when we evaluate the divergence of the heat flux, we obtain (using axisymmetry)
\begin{equation}
\dv\bm{q}_i = \dv\left( \chi_{i\perp} \grad_\perp T_i \right).
\end{equation}
To estimate this term, we assume that all the plasma profiles vary on a scale $a$ that is related to the width of the plasma column $w$ by $a = w/2$, see \Figref{scales} for more details. Thus, we have that
\begin{equation}
\dv{\bm{q}_i} \approx \frac{1}{a^2} \chi_{i\perp} T_i = \frac{2 n_i T_i^2}{m_i \cycfreq[i]^2 \tau_i a^2},
\end{equation}
where we have used (2.16) of \citet{braginskii1965tpp} for $\chi_{i\perp}$ and $\tau_i$ is the ion-ion collision time.

For electrons, the same geometric algebra applies and we have
\begin{equation}
\dv{\bm{q}_e} \approx \frac{1}{a^2} \chi_{e\perp} T_e = \frac{4.66 n_e T_e^2}{m_e \cycfreq[e]^2 \tau_e a^2},
\end{equation}
which is approximately $\sqrt{m_e/m_i}$ smaller than the ion heat loss, and usually negligible.

\begin{figure}
\includegraphics{ScaleLengths.pdf}
\caption{Plasma column showing its width $w$, lenght $L$, and scale length $a$}
\label{scales}
\end{figure}

We only compute the stress tensor for the ions, electron perpendicular viscosity is at least $m_e/m_i$ smaller than the ion viscosity and always negligible.
To compute the Braginskii viscous stress tensor, we need to know the rate of strain tensor $\tensor{W}$:
\begin{equation}
\tensor{W} = \left(\grad\bm{u}\right) + \left(\grad\bm{u}\right)^{T} - \frac{2}{3} \left(\dv\bm{u}\right)\idmat,
\end{equation}
which, upon using $\bm{u} = \omega R^2 \grad\tor$, becomes
\begin{equation}
\tensor{W} = R^2 \frac{d \omega}{d\psi} \left( \grad\psi \grad \tor + \grad \tor \grad \psi\right) \approx \frac{R}{a} \omega
\end{equation}
Evaluating this on the midplane, we see that in Braginskii's cartesian coordinates (with $z$ along $\bm{b}$) the only nonzero component of $\tensor{W}$ is $W_{xy}$ (equivalently $W_{yx}$).
Thus, using (2.21) of Braginskii, we can compute the nonzero components of the stress tensor. The quantities we need are
\begin{equation}
\dv\left( \pitens\cdot R^2\grad\tor \right) \approx \frac{1}{a} \pi_{xy} R = - \frac{R}{a} \frac{3}{10} \frac{n_i T_i}{\cycfreq[i]^2 \tau_i} W_{xy} = - \frac{R}{a} \frac{3}{10} \frac{n_i T_i}{\cycfreq[i]^2 \tau_i} \frac{R}{a} \omega,
\end{equation}
and
\begin{equation}
\pitens \bm{:}\grad\bm{u} = \frac{1}{2} \pi_{xy} W_{xy} \approx - \frac{3}{10} \frac{n_i T_i}{\cycfreq[i]^2 \tau_i}\frac{R^2\omega^2}{a^2}.
\end{equation}

Note that, because we are using Braginskii's formulae, we also have to use his formula for the collision times (see \citet{braginskii1965tpp}) which differ by $\sqrt{2}$ from some other definitions of $\tau_i$.

\subsection{Alpha Particles and Nuclear Physics}
Our fundamental model for alpha particles is that they are all born with a delta-function distribution at the birth energy of $E_\alpha = 3.52$ MeV:
\begin{equation}
\left( \pd{f_\alpha}{t}\right)_{\mathrm{Source}} = \frac{S_\alpha \delta(v-v_*)}{4\pi v_*^2}
\end{equation}
where $v_*$ is the birth velocity corresponding to $E_\alpha$ and $S_\alpha$ is the birth rate of alphas per unit time per unit volume.

\subsubsection{Prompt Alpha Losses}
Alpha particles are born isotropically. Thus, a fraction of them are born directly into the unconfined region of velocity space.
The birth energy of alphas $E_\alpha$ is much greater than the centrifugal potential which is roughly $M^2 T_e / 4$ (at fusion temperatures and parameters this remains
less than $0.5$ MeV). We thus model the loss region for energetic alphas as a cone, and only classical mirror confinement applies, thus an alpha is lost if
\begin{equation}
\mu_\alpha B_{\mathrm{max}} > E_\alpha.
\end{equation}
Integrating this over all velocity space, we see that the fraction of alphas that is lost is
\begin{equation}
f_{\mathrm{lost}} = 1 - \sqrt{1 - \frac{1}{R_{\mathrm{mirror}}}}.
\end{equation}
This fraction of alpha particles is removed from \mctrans{} and hurled against the end plates.
This prompt loss of alpha particles is taken into account in assessing quasineutrality.

\subsubsection{Collisional Alpha Losses}
Currently, we do not have any explicit collisional losses of alpha particles. However, the approximate lifetime of alpha particles in the machine is (under the twin assumptions that of $R_{\mathrm{mirror}} \gg 1$ and that we can treat alphas like main ions, see e.g. \citet{ryutovOpenTraps})
\begin{equation}
\tau_\alpha \approx 0.4 \tau_{\alpha i} \ln R_{\mathrm{mirror}},
\end{equation}
where $\tau_{\alpha e}$ is the alpha-ion collision time (alpha-electron collisions do not change the pitch-angle of the alpha particles), which is marginally longer than the time it takes the alphas to deposit a reasonably large amount of their energy into electrons and ions.
Really we should solve the Fokker-Planck kinetic equation for alpha particles with a source and a loss cone as is done in \citet{santarius1982}.

\subsubsection{Alpha Heating}
Currently, all the energy in the retained alpha particles is deposited into the electron species as heating through collisions.
This is a pessimistic assumption as electron heating leads to a lower Mach number, faster electron losses, an increasingly electron-confining $\pot$, and hence increased ion losses.

\subsection{Neutral Transport}
We currently have no model of transport due to neutral particles. A first step towards this will be implementing a diagnostic for
the neutral mean free path in our plasma. In the limit of either very small or very long mean free path, we may be able to make further approximations to evaluate the
losses from charge exchange.
\\
\textbf{N.B. Until more neutral physics is implemented, we have no way to handle self-consistent fuelling scenarios. The only reasonable assumption
	is that losses due to neutrals are small and feedback control is used to target a fixed electron density.}

\subsection{Radiative Processes and Impurities}
There are two ways to model impurities in \mctrans{}. Firstly is a ``lumped impurity'' that only changes the effective charge state $Z_{\mathrm{eff}}$ and
provides \textit{only} bremsstrahlung radiation. It does not dilute the main ion species, so quasineutrality is enforced by only considering the main ions and
electrons.

\subsubsection{Bremsstrahlung and Synchrotron Radiation}
Taking the formulae for bremsstrahlung from the NRL formulary~\cite{nrlformulary} and writing it in convenient units we have
\begin{equation}
P_{\mathrm{rad}} =  5.34 \times 10^3\, Z_{\mathrm{eff}} \left(\frac{n_e}{10^{20} \mathrm{m}^{-3}}\right)^2 \left(\frac{T_e}{1 \mathrm{keV}}\right)^{1/2}\, \mathrm{W}/\mathrm{m}^3,
\end{equation}
where we have used the definition
\begin{equation}
Z_{\mathrm{eff}} = \frac{1}{n_e} \sum_{s} Z_s^2 n_s,
\end{equation}
of the effective charge state of the plasma (summation taken over all positively charged species).
Similarly, we can take the synchrotron radiation formula from the formulary~\cite{nrlformulary} and write it as
\begin{equation}
P_{\mathrm{rad}} =  6.21 \times 10^3 \,\left( \frac{B}{1\,\mathrm{T}} \right)^2 \left( \frac{n_e}{10^{20}\, \mathrm{m}^{-3}} \right) \left( \frac{T_e}{1\,\mathrm{keV}} \right)\, \mathrm{W}/\mathrm{m}^3.
\end{equation}

The plasma is assumed to be optically thin, and so all radiation is lost onto the first wall.

\subsubsection{Line Radiation}
 Without a better model for the impurity species that are present (including multiple charge states) we cannot reliably predict the amount of line radiation lost from the plasma.
\\
\textbf{N.B. Because of the lack of ionization and radiative cooling, one should view low-temperature outputs from \mctrans{} extremely sceptically!}

\appendix
\section{Full Syntax for \mctrans{} configuration files}

\section{Non-Physical Implementation}
The use of "fudge-factors" has been included to simulate arbitrarily better or worse confinement. The default value is 1, and values less than or greater than 1 result in better or worse confinement, respectively. The fudge factors are applied to loss rates (either particle or heat). There are separate fudge factors for perpendicular and parallel, and viscous and thermal transport.

\bibliographystyle{apsrev}
\bibliography{references}
\end{document}


\section{Spacecraft Model}

\subsection{RF Hardware Models}

The RF Hardware models in GMAT include transmitters, receiver, and transponders.  For each type of RF Hardware there are models for signal transmission/reception feasibility, received frequency, and transmitted frequency to name a few.  In the sections below we present these models for each type of RF Hardware.

\subsubsection{Receiver}

The receiver model supports a frequency model and a reception feasibility model.  The frequency model allows the user to specify the frequency capabilities of the receiver using different methods.  The feasibility model determines whether an RF signal sensed at the receiver can feasibly detected given the receivers capability as defined by the frequency model.

When the frequency model \st{CenterAndBandwidth} is selected, the feasibility test is as follows.  Define the frequency transmitted by the originating transmitter as $F_t$, the receiver's center frequency as $F_C$, the bandwidth as $\Delta F$, and the range rate between transmitter and receiver as $\dot{\rho}$ (which is positive when the distance $\rho$ is increasing).  The frequency at the receiver is calculated using
%
\begin{equation}
     F_r = F_t(1 - \frac{\dot{\rho}}{c})
\end{equation}
%
where $c$ is the speed of light.  Define the upper limit of the receiver as $F_u = F_c + \Delta F / 2$ and the lower limit as $F_l = F_c - \Delta F / 2$ .  If
%
\begin{equation}
       F_l \leq F_r \leq F_u
\end{equation}
%
then the received frequency is received by the receiver model.  If the above test fails, the receiver does not receive the signal.

\subsubsection{Transmitter}

\subsubsection{Transponder}

\subsubsection{Antenna}

\subsection{Thruster Models}

GMAT supports several thruster models.  The thruster models employ
physics and empirical data provided by the thruster manufacturer to
model thrust and mass flow rate used in orbit and attitude equations
of motion.   The thrust magnitude and $I_{sp}$ are assumed to be
functions of thruster inlet flow conditions including  pressure,
temperature, and for bi-propellant thrusters, the oxidizer to fuel
ratio.

In the following subsections we present models for thrust magnitude
and mass flow rates for several thruster types.  All thrusters have
a location and orientation.  The location is described in the
spacecraft body system.  The orientation can be described with
respect to any coordinate system known to GMAT. Let's define the
rotation matrix from the thruster frame $\mathcal{F}_T$ to Earth's
MJ2000 Equator as $\mathbf{R}_T$. Then, the thrust used in the orbit
equations of motion is
%
\begin{equation}
    \mathbf{F}_T = F_T \mathbf{R}_T \hat{\mathbf{T}}
\end{equation}
%
where $F_T$ is the thrust magnitude and is thruster dependent, and
$\hat{\mathbf{T}}$

Now let's look at how to calculate the thrust magnitude for a
mono-propellant chemical thruster.

\subsubsection{Mono-Propellant Chemical Thruster}

temperature.  The specific form of Eqs.~(\ref{Eq:MonoPropThrust})
and (\ref{Eq:MonoPropIsp}) are determined by fitting test data to
approximate thrust and $I_{sp}$ as function $T_i$ and $P_i$.  The
user can supply this relationship via a scripte
%
\begin{figure}[h!]
\centerline{
\begin{picture}(100,480)
\special{psfile= ./Images/MonoPropThruster.eps hoffset= -20 voffset= 250
hscale=25 vscale=25}
\makebox(100,540){$\dot{m}_e$,$P_e$,$v_e$}
%
\makebox(-105,710){$\dot{m}_c$,$T_c$,$P_c$}
%
\makebox(-105,920){$m_f$,$T_f$,$P_f$}
%
\makebox(-255,880){Catalyst Bed}
\end{picture}}\vskip -3.75 in  \caption{ Mono-Prop Thruster Diagram} \label{fig:MonoPropThruster}
\end{figure}

We assume thruster data is given as a function of thruster inlet
properties (as opposed to thrust chamber properties), and thrust
magnitude and $I_{sp}$ are modelled using
%
\begin{equation}
    F_T = f(P_i,T_i)\label{Eq:MonoPropThrust}
\end{equation}
%
\begin{equation}
    I_{sp} = f(P_i,T_i)\label{Eq:MonoPropIsp}
\end{equation}
%
where $P_i$ and $T_i$ are the thruster inlet pressure and
temperature.  The specific form of Eqs.~(\ref{Eq:MonoPropThrust})
and (\ref{Eq:MonoPropIsp}) are determined by fitting test data to
approximate thrust and $I_{sp}$ as function $T_i$ and $P_i$.  The
user can supply this relationship via a scripted equation or by
providing a function name.  After calculating $F_T$ and $I_{sp}$, we
calculate the mass flow rate using
%
\begin{equation}
   \dot{m}_e = \frac{F_T}{I_{sp}}
\end{equation}

\subsubsection{Bi-Propellant Chemical Thruster}

\begin{figure}[h!]
\centerline{
    \begin{picture}(100,470)
    \special{psfile= ./Images/BiPropThruster.eps hoffset= -20 voffset= 260
    hscale=25 vscale=25}
    \makebox(80,545){$\dot{m}_e$,}\makebox(-47,545){$P_e$,}
    \makebox(-30,545){$v_e$}
    \makebox(-70,730){$\dot{m}_c$,$m_r$,$T_c$,$P_c$}
    \makebox(-30,938){$m_f$,$T_f$,$P_f$}
    \makebox(-140,938){$m_o$,$T_o$,$P_o$}
    \end{picture}}\vskip -3.75 in  \caption{ Bi-Prop Thruster Diagram} \label{fig:BiPropThruster}
\end{figure}

\begin{equation}
    m_r = \frac{\dot{m}_o}{\dot{m}_f}
\end{equation}
%
\begin{equation}
    \dot{m}_c = \dot{m}_o + \dot{m}_f
\end{equation}
%
\begin{equation}
    T'=  \frac{\dot{m}_o T_o + \dot{m}_f T_f}{\dot{m}_o + \dot{m}_f}
\end{equation}
%
\begin{equation}
    P' =  \frac{\dot{m}_o P_o + \dot{m}_f P_f}{\dot{m}_o + \dot{m}_f}
\end{equation}
%
\begin{equation}
   F = f(P_c,T_c,of)
\end{equation}
%
\begin{equation}
   I_{sp} = f(P_c,T_c,of)
\end{equation}
%
\begin{equation}
   \dot{m}_e = \frac{\mathbf{F}_T}{I_{sp}}
\end{equation}

\subsubsection{Thruster Pulse Modelling}

\begin{equation}
T'=\frac{T(t)}{T_{max}} = \left\{\begin{array}{ll}
             \displaystyle\frac{t^2(t - t_{si})^2}{t_{si}^4} &
             \mbox{$t \leq t_{si}$}\\
             1 & \mbox{$t_{si}<t<t_{sf}$}\\
             \displaystyle\frac{(t - 2 t_{sf} + t_{f})^2(t - t_f)^2}{(t_f - t_{sf})^4}
             & \mbox{$t_{sf} \leq t \leq t_f$}\\
             \end{array}\label{eq:quartic}
      \right.
\end{equation}
%
\begin{figure}[ht]
\centerline{
    \begin{picture}(100,385)
    \special{psfile= ./Images/ThrustPulseProfile.eps hoffset= -150 voffset= 60
    hscale=65 vscale=65}
    \end{picture}}\vskip -3.75 in  \caption{ Sample Thrust Pulse Profile } \label{fig:ThrustPulseProfile}
\end{figure}
%
%
The time to the thrust centroid, $t_c$, is calculated using
%
\begin{equation}
     t_c = \displaystyle\frac{\displaystyle\int_0^{t_{f}} t \mbox{ }T'(t) dt}{\displaystyle\int_0^{t_{f}} T'(t)dt}
\end{equation}
%
performing the integral yields
%
\begin{equation}
    t_c = \frac{-4 t_{si}^2  + 4 t_{sf}^2  + 6 t_{sf} t_f + 5 t_f^2 }{-14 t_{si} + 14 t_{sf} + 16 t_f}
\end{equation}

\subsubsection{Thruster Hot Fire Test Data \\ and Thruster Models}

Thruster hot fire test data is used to develop empirical models that
describe thruster performance as a function of inlet conditions such
as fuel pressure and temperature.  In this section we'll discuss how
the empirical models are developed and discuss how the empirical
models are consistent with the physical models.  First we present
the physics model  for a thruster test stand experiment.  Next we
present what is measured during a thrust stand test, and show how
the measurements are used in combination with the physics model to
generate a model of thruster performance over  a given range of
thruster inlet conditions.

In Fig.~\ref{fig:ThrustStand} we see an illustration of a simple
thrust test setup.  The thruster is mounted to a rigid surface.
%
\begin{figure}[h!]
\centerline{
\begin{picture}(100,400)
\special{psfile= ./Images/ThrusterOnStand.eps hoffset= -35 voffset= 220
hscale=25 vscale=25}
\makebox(-120,700){$\dot{m}$}\makebox(-120,675){$T_i$}
\makebox(-125,650){$P_i$}\makebox(225,705){$\dot{m}$}\makebox(-190,680){$c^*=
I_{sp}g$}\makebox(-225,655){$P_e$}\makebox(-225,530){$F_T$}
\end{picture}}\vskip -3.5 in  \caption{ Thrust Stand Illustration} \label{fig:ThrustStand}
\end{figure}
%
The force due to thrust, $F_T$, can be written as
%
\begin{equation}
    F_T = \dot{m}v_e - (P_e - P_a)A_e
\end{equation}
%
where
\begin{tabbing}
    12345678 \= Reynolds number based on length $s$ \kill
    $\dot{m}$    \>  mass flow rate, kg/s \\
    $T_i$        \>  fuel inlet temperature, K$^{\circ}$\\
    $P_i$        \>  fuel inlet pressure, Pa\\
    $c^*$        \>  characteristic velcocity, m/s \\
    $I_sp$       \>  specific impulse, s \\
    $g_o$        \>  9.801 m/s$^2$ \\
    $P_e$        \>  nozzle exit pressure, Pa\\
    $A_e$        \>  nozzle exit area, m$^2$\\
    $F_T$        \>  force due to thrust, N\\
\end{tabbing}
%
we can rewrite this as
\begin{equation}
    F_T = \dot{m}\left(v_e - \frac{(P_e - P_a)A_e}{\dot{m}}\right)  \label{Eq:Fvsmv}
\end{equation}
%
From this equation we define the characteristic velocity, $c^*$,
using
%
\begin{equation}
    c^* = \left(v_e - \frac{(P_e - P_a)A_e}{\dot{m}}\right)
\end{equation}
%
In practice, $v_e$ or $P_e$ are not measured.  We'll assume the
tests are performed in a vacuum so $P_a = 0$.  To understand how we
relate the measurements to physical model, let's define a new
quantity $I_{sp}$, where
%
\begin{equation}
    I_{sp} = \frac{F_T}{\dot{m} g_o}
\end{equation}
%
we can rewrite this as
%
\begin{equation}
    F_T = \dot{m} I_{sp} g_o \label{Eq:IspVer2}
\end{equation}
%
Comparing Eq.s~(\ref{Eq:Fvsmv}) and (\ref{Eq:IspVer2}) we see that
%
\begin{equation}
     c^* = I_{sp} g_o = v_e - \frac{(P_e - P_a)A_e}{\dot{m}}
     \label{Eq:CstarIsp}
\end{equation}
%
Equation (\ref{Eq:CstarIsp}) shows that $I_{sp}$ is a measure of the
effective (characteristic) exhaust velocity.  $I_{sp}$ contains
information on the energy stored in the fuel and how that energy
translates to exit velocity.   When $I_{sp}$ is calculated from
measured thrust data, the $I_{sp}$ contains a correction for exhaust
velocity for force due to pressure $(P_e - P_a)A_e$.

The characteristic velocity, and hence $I_{sp}$, depend on the type
of fuel and the inlet temperature and pressure of the fuel.
Experimental data determines how
%
\begin{equation}
    I_{sp}(T_i,P_i) = \left.\frac{F_T}{\dot{m}g_o}\right|_{(T_i,P_i)}
\end{equation}
%
\begin{tabbing}
    12345678     \= Reynolds number based on length $s$ \kill
    $\dot{m}$    \>  Known      \\
    $T_i$        \>  Known      \\
    $P_i$        \>  Known      \\
    $g_o$        \>  Known      \\
    $F_T$        \>  Measured   \\
    $I_sp$       \>  Calculated \\
\end{tabbing}

\include{TankModels}

\subsection{Mass Properties}

\subsubsection{Spherical Tank}
\clearpage
\begin{figure}[ht]
\centerline{
    \begin{picture}(110,440)
    \special{psfile= ./Images/PartiallyFilledTank.eps hoffset= -110 voffset=
    90
    hscale=55 vscale=55}
    \makebox(-47,665){$h$}
    \makebox(135,620){$r$}
    \makebox(0,695){$\hat{y}$}
    \makebox(-165,850){$\hat{z}$}
    \makebox(-165,515){($\hat{x}$ is out of the page)}
    \end{picture}}\vskip -3.65 in  \caption{ Geometry For Mass Properties of Partially Filled Spherical Tank} \label{fig:PartiallyFilledTank}
\end{figure}

\begin{equation}
    V = \frac{1}{3}\pi \left( 3r - h \right)h^2
\end{equation}
%
\begin{equation}
    cg_z = \displaystyle\frac{-\displaystyle\frac{3}{4}h^2 + 3hr - 3r^2}{3r - h}
\end{equation}
%
\begin{equation}
    cg_x = cg_y = 0
\end{equation}
%
\begin{equation}
   I_{zz} = \frac{\pi \rho}{2}\left(\frac{1}{5}\left( h - r\right)^5 - \frac{2}{3}r^2\left( h - r\right)^3  + r^4(h-r) + \frac{8}{15}r^5 \right)
\end{equation}
%
\begin{equation}
   I_{xx} = \frac{\pi \rho}{2}\left(-\frac{3}{10}\left( h - r\right)^5 + \frac{1}{3}r^2\left( h - r\right)^3  + \frac{1}{2}r^4(h-r) + \frac{8}{15}r^5 \right)
\end{equation}
%
\begin{equation}
   I_{yy} = I_{xx}
\end{equation}
%
\begin{equation}
    \mathbf{I}' = \mathbf{R}_{bt}^T
    \left(\begin{array}{ccc}
         I_{xx} & 0 & 0 \\
         0 & I_{yy} & 0\\
         0 & 0 & I_{zz}\\
    \end{array}\right)
     \mathbf{R}_{bt} \
\end{equation}
%
Estey \cite{Estey:83} gives appoximate equations for the area of
different portions for a partially filled sphere. The area of the
spherical shell in contact with the gaseous region is given by
%
\begin{equation}
   A_g = 4.0675 \cdot V^{2/3}\left(\frac{V_g}{V}\right)^{0.62376}
\end{equation}
%
The area of the boundary between the liquid and the gaseous region
is given by
%
\begin{equation}
   A_b = A_g - 3.4211 \cdot V^{2/3}\left(\frac{V_g}{V}\right)^{1.24752}
\end{equation}
%
Finally, the area of the spherical shell in contact with the liquid
is given by
%
\begin{equation}
   A_l = \pi D^2 - A_g
\end{equation}
%

%\input{FlowModelling}


\appchapter{Generated Data}
\label{appendix:data}
\section{Uniform}
\label{appendix:data:uniform}
\begin{figure}[H]
\centering
\begin{subfigure}{.8\textwidth}
	\includegraphics[width=.9\textwidth]{img/0_UNIFORM_plot.png}
\end{subfigure}%
\begin{subfigure}{.2\textwidth}
  \centering
  \begin{minipage}{1\textwidth}
\textbf{Widths:}
\\
min: 47
\\
max: 47
\\
mean: 47.00
\\
variance: 0.00
\\
std: 0.00
\\
skewness: 0.00
\\
kurtosis: $-3.00$
\\\\
\textbf{Heights:}
\\
min: 109
\\
max: 109
\\
mean: 109.00
\\
variance: 0.00
\\
std: 0.00
\\
skewness: 0.00
\\
kurtosis: $-3.00$
  \end{minipage}
\end{subfigure}
% \caption{Data distribution for 0\_Uniform.in}
% \source{Compiled by the authors}
\end{figure}
\section{Random}
\label{appendix:data:rand}
\begin{figure}[H]
\centering
\begin{subfigure}{.8\textwidth}
	\includegraphics[width=.9\textwidth]{img/1_RAND_plot.png}
\end{subfigure}%
\begin{subfigure}{.2\textwidth}
  \centering
  \begin{minipage}{1\textwidth}
\textbf{Widths:}
\\
min: 7
\\
max: 511
\\
mean: 259.78
\\
variance: 21293.52
\\
std: 145.92
\\
skewness: $-0.01$
\\
kurtosis: $-1.20$
\\\\
\textbf{Heights:}
\\
min: 13
\\
max: 1201
\\
mean: 606.26
\\
variance: 120065.68
\\
std: 346.50
\\
skewness: 0.00
\\
kurtosis: $-1.20$
  \end{minipage}
\end{subfigure}
% \caption{Data distribution for 1\_Rand.in}
% \source{Compiled by the authors}
\end{figure}

\section{Random with Constant Height}
\label{appendix:data:randconstheight}
\begin{figure}[H]
\centering
\begin{subfigure}{.8\textwidth}
	\includegraphics[width=.9\textwidth]{img/2_RANDCONSTHEIGHT_plot.png}
\end{subfigure}%
\begin{subfigure}{.2\textwidth}
  \centering
  \begin{minipage}{1\textwidth}
\textbf{Widths:}
\\
min: 7
\\
max: 511
\\
mean: 258.52
\\
variance: 21358.88
\\
std: 146.15
\\
skewness: $-0.00$
\\
kurtosis: $-1.20$
\\\\
\textbf{Heights:}
\\
min: 109
\\
max: 109
\\
mean: 109.00
\\
variance: 0.00
\\
std: 0.00
\\
skewness: 0.00
\\
kurtosis: $-3.00$
  \end{minipage}
\end{subfigure}
% \caption{Data distribution for 2\_Randconstheight.in}
% \source{Compiled by the authors}
\end{figure}

\section{Random with Constant Width}
\label{appendix:data:randconstwidth}
\begin{figure}[H]
\centering
\begin{subfigure}{.8\textwidth}
	\includegraphics[width=.9\textwidth]{img/3_RANDCONSTWIDTH_plot.png}
\end{subfigure}%
\begin{subfigure}{.2\textwidth}
  \centering
  \begin{minipage}{1\textwidth}
\textbf{Widths:}
\\
min: $47$
\\
max: $47$
\\
mean: $47.00$
\\
variance: $0.00$
\\
std: $0.00$
\\
skewness: $0.00$
\\
kurtosis: $-3.00$
\\\\
\textbf{Heights:}
\\
min: $13$
\\
max: $1201$
\\
mean: $607.04$
\\
variance: $119714.09$
\\
std: $346.00$
\\
skewness: $-0.00$
\\
kurtosis: $-1.20$
  \end{minipage}
\end{subfigure}
% \caption{Data distribution for 3\_Randconstwidth.in}
% \source{Compiled by the authors}
\end{figure}
\section{Skewed}
\label{appendix:data:skewed}
\begin{figure}[H]
\centering
\begin{subfigure}{.8\textwidth}
	\includegraphics[width=.9\textwidth]{img/4_SKEWED_plot.png}
\end{subfigure}%
\begin{subfigure}{.2\textwidth}
  \centering
  \begin{minipage}{1\textwidth}
\textbf{Widths:}
\\
min: 7
\\
max: 511
\\
mean: 60.90
\\
variance: 2490.82
\\
std: 49.91
\\
skewness: 5.19
\\
kurtosis: 40.29
\\\\
\textbf{Heights:}
\\
min: 13
\\
max: 1201
\\
mean: 195.35
\\
variance: 17598.95
\\
std: 132.66
\\
skewness: 2.40
\\
kurtosis: 14.07
  \end{minipage}
\end{subfigure}
% \caption{Data distribution for 4\_Skewed.in with 1\% total skewed options}
% \source{Compiled by the authors}
\end{figure}
\section{Skewed with Constant Height}
\label{appendix:data:skewedconstheight}
\begin{figure}[H]
\centering
\begin{subfigure}{.8\textwidth}
	\includegraphics[width=.9\textwidth]{img/5_SKEWEDCONSTHEIGHT_plot.png}
\end{subfigure}%
\begin{subfigure}{.2\textwidth}
  \centering
  \begin{minipage}{1\textwidth}
\textbf{Widths:}
\\
min: 7
\\
max: 511
\\
mean: 61.06
\\
variance: 2493.88
\\
std: 49.94
\\
skewness: 5.15
\\
kurtosis: 39.87
\\\\
\textbf{Heights:}
\\
min: 13
\\
max: 1201
\\
mean: 602.58
\\
variance: 121471.29
\\
std: 348.53
\\
skewness: 0.01
\\
kurtosis: $-1.22$
  \end{minipage}
\end{subfigure}
% \caption{Data distribution for 5\_Skewedconstheight.in with 1\% total skewed options}
% \source{Compiled by the authors}
\end{figure}
\section{Skewed with Constant Width}
\label{appendix:data:skewedconstwidth}
\begin{figure}[H]
\centering
\begin{subfigure}{.8\textwidth}
	\includegraphics[width=.9\textwidth]{img/6_SKEWEDCONSTWIDTH_plot.png}
\end{subfigure}%
\begin{subfigure}{.2\textwidth}
  \centering
  \begin{minipage}{1\textwidth}
\textbf{Widths:}
\\
min: 7
\\
max: 507
\\
mean: 254.24
\\
variance: 21164.27
\\
std: 145.48
\\
skewness: 0.02
\\
kurtosis: $-1.21$
\\\\
\textbf{Heights:}
\\
min: 13
\\
max: 1201
\\
mean: 194.23
\\
variance: 17615.88
\\
std: 132.72
\\
skewness: 2.41
\\
kurtosis: 14.05
  \end{minipage}
\end{subfigure}
% \caption{Data distribution for 6\_Skewedconstwidth.in with 1\% total skewed options}
% \source{Compiled by the authors}
\end{figure}


\documentclass[runningheads]{llncs}

\usepackage{graphicx}
\usepackage{placeins}
\usepackage{hyperref,xcolor}
\renewcommand\UrlFont{\color{blue}\rmfamily}
\usepackage{amsmath}

\begin{document}

\title{Alternatives for Neighborhood Function in Kohonen Maps \thanks{This work was supported by a private funding of Velbazhd Software LLC.}}
\titlerunning{Neighborhood in SOM}

\author{Iliyan Zankinski \and
Kolyu Kolev \and
Todor Balabanov\orcidID{0000-0003-3139-069X}}
\authorrunning{I. Zankinski et al.}

\institute{Institute of Information and Communication Technologies \\
Bulgarian Academy of Sciences \\
acad. Georgi Bonchev Str., Block 2, 1113 Sofia, Bulgaria \\
\email{iliyan@hsi.iccs.bas.bg} \\
\url{http://iict.bas.bg/}}

\maketitle

\begin{abstract}
In the field of the artificial intelligence artificial neural networks are one of the most researched topics. Multilayer perceptron has a reputation for the most used type of artificial neural network, but other types such as Kohonen maps, generalized nets\cite{tashev01} or combinations with Kalman filter\cite{alexandrov01,voort01} are also very interesting. Proposed by Teuvo Kohonen in the 1980s, self-organizing maps have application in meteorology, oceanography, project prioritization and selection, seismic facies analysis for oil and gas exploration, failure mode and effects analysis, creation of artwork and many other areas. Self-organizing maps are very useful for visualization by data dimensions reduction. Unsupervised competitive learning is used in self-organizing maps and the basic idea is the net to classify input data in predefined number of clusters. When the net has fewer nodes it achieve results similar to K-means clustering. One of the components in the self-organizing maps is the neighborhood function. It gives scaling factor for the distance between one neuron and other neurons in each step. The simplest form of a neighborhood function gives 1 for the closest nodes and 0 for all other, but the most used neighborhood function is a Gaussian function. In this research fading cosine and exponential regulated cosine functions are proposed as alternatives for neighborhood function.

\keywords{Artificial neural networks \and Self-organizing maps \and Neighborhood functions.}
\end{abstract}

\section{Introduction}

Self-organizing maps or Kohonen Neural Networks (KNNs) are networks with unsupervised training \cite{schreck01}. They are very useful in finding nonlinear dependencies when data are presented in very high dimensional spaces. The projection from the high-dimensional space is usually done in a rectangular lower-dimensional space \cite{macq01}. The main idea behind KNNs is the organization of unlabeled vectors with particular features in predefined number of groups called clusters \cite{cottrell01}. Grid of the self-organizing map is a handy tool for convenient visualization which can reveal different features of the network. SOMs are attractive when they consist of two or more separate regions. The real goal is not to find a perfect clustering but get good idea of the cluster structure.

\subsection{Clustering}

Clustering means a separation of the data set in set of groups. In separation where each data sample belongs exactly to only one group it is called straight clustering. If each data sample has varying degree of membership to different groups it is called fuzzy clustering.

Generally accepted concept of an optimal clustering is data set separation which minimizes the distance inside the cluster and maximizes the distance between the clusters. The most used form of distance measurement is the Euclidean norm \cite{lozano01}.

\subsection{SOM Training}

The network consists of a grid (usually two dimensional \cite{wehrens01}) with units. The units are connected to adjacent units with a neighborhood relation. The amount of grid units, which usually varies from a few dozen up to several thousand, gives the accuracy and generalization possibilities of the KNN. The network forms an elastic mesh that folds as a cloud formed by the input data during training phase. Data samples lying near each other in the input space are mapped into nearby grid units.

The network training is done iteratively. A data sample vector is randomly chosen from the input data set, as first step. As second step, distances between the selected vector and all the prototype vectors are computed. The best matching unit is the grid unit with prototype closest the selected vector. In the third step, the prototype vectors in the grid are updated. The best matching unit and its topological neighbors are moved closer to the input vector in the input space \cite{vesanto01,аmerijckx01}.

\section{Neighborhood Function}

The most used KNN's neighborhood function is the Gaussian function. In this research two alternative functions are proposed. The first function is fading cosine, which is shown in Fig.\ref{fig01}-Left. The second function is exponential regulated cosine, which is shown in FIg.\ref{fig01}-Right.

\begin{figure}
\includegraphics[width=1.0\textwidth]{fig01.png}
\centering
\caption{Left - Fading cosine neighborhood function. Right - Exponential regulated cosine neighborhood function.} \label{fig01}
\end{figure}
\FloatBarrier

The idea for the both functions is to stress grid nodes down and up. The exponential regulated cosine Eq.\ref{equ02} gives smoother stress than the fading cosine Eq.\ref{equ01}.

\begin{equation} \label{equ01}
f(x) =
	\begin{cases}
		cos(x) & -\pi/2 < x < \pi/2 \\
		\frac{cos(x)}{|x|} & +\pi/2 \geq x \leq -\pi/2 \\
	\end{cases}
\end{equation}

\begin{equation} \label{equ02}
f(x) = \frac{cos(x)}{e^{|x|}}
\end{equation}

\section{Experiments and Results}

All experiments were done on a single processor desktop machine - Intel Core i5, 2.3 GHz, 2 Cores, 8GB RAM and Mac OS X 10.13.6, Apple LLVM version 9.1.0.

\begin{figure}
\includegraphics[width=1.0\textwidth]{fig03.png}
\centering
\caption{Rents and living area data set \cite{garriga01}.} \label{fig03}
\end{figure}
\FloatBarrier

As experimental data set rents and living area (shown in Fig.\ref{fig03}) are taken from the open source project, which can be found at \cite{garriga01}.

Experiments are done with Gausssian neighborhood function Fig.\ref{fig02}-Left, fading cosine neighborhood function Fig.\ref{fig02}-Center and exponential regulated cosine neighborhood function Fig.\ref{fig02}-Right. Results show that fading cosine function performs less effective than exponential regulated cosine, but exponential regulated cosine gives sharper clusters separation than the Gaussian function. All three functions give clear clusterization. Data are separated in four common groups as it is shown on middle row of Fig. \ref{fig02}.

\begin{figure}
\includegraphics[width=1.0\textwidth]{fig02.png}
\centering
\caption{Left - Gausssian neighborhood function. Center - Fading cosine neighborhood function. Right - Exponential regulated cosine neighborhood function.} \label{fig02}
\end{figure}
\FloatBarrier

\section{Conclusions}

The proposed neighbor functions give promising results as it is shown in the experimental section. Stressing the neighboring nodes down and up leads to better separation between the formed clusters. As further research it will be interesting the proposed neighborhood functions to be combined with different distance norms. In some problems Hausdorff distance can be used for example. Situations in time series \cite{atanasova01} are also interesting for classification with KNN and the capabilities of the soft computing \cite{angelova01}.

\begin{thebibliography}{8}

\bibitem{tashev01}
Tashev, T., Hristov, H.: Modeling of synthesis of information processes with generalized nets. Cybernetics and Information Technologies, \textbf{3}(2), 92--104 (2003)

\bibitem{alexandrov01}
Alexandrov, A.: AD HOC Kalman filter based fusion algorithm for real-time Wireless Sensor Data Integration. In: FQAS-2015 Proceedings, pp. 151--160. Springer, Heidelberg (2015)

\bibitem{voort01}
van der Voort, M., Dougherty, M.,Watson, S.: Combining kohonen maps with arima time series models to forecast traffic flow. Transportation Research Part C: Emerging Technologies, \textbf{4}(5), 307--318 (1996)

\bibitem{schreck01}
Schreck, T., Bernard, J., Landesberger, T. von, Kohlhammer, J.: Visual Cluster Analysis of Trajectory Data with Interactive Kohonen Maps. Information Visualization, \textbf{8}(1), 14--29 (2009)

\bibitem{macq01}
Macq, D., Verleysen, M., Jespers, P., Legat, J.D.: Analog implementation of a Kohonen map with on-chip learning. IEEE Transactions on Neural Networks, \textbf{4}(3), 456--461 (1993)

\bibitem{cottrell01}
Cottrell M., Letremy P., Roy E.: Analysing a contingency table with Kohonen maps: A factorial correspondence analysis. In: Mira J., Cabestany J., Prieto A. (eds) New Trends in Neural Computation. Lecture Notes in Computer Science, pp. 305--311. Springer, Heidelberg (1993)

\bibitem{lozano01}
Lozano, S., Guerrero, F., Onieva, L., Larraneta, J.: Kohonen maps for solving a class of location-allocation problems. European Journal of Operational Research, \textbf{108}(1), 106--117 (1998)

\bibitem{wehrens01}
Wehrens, R., Buydens, L.: Self- and Super-organizing Maps in R: The kohonen Package. Journal of statistical software, \textbf{21}(5), 1--19 (2007)

\bibitem{vesanto01}
Vesanto, J., Alhoniemi, E.: Clustering of the Self-Organizing Map. IEEE Transactions on Neural Networks, \textbf{11}(3), 586--600 (2000)

\bibitem{аmerijckx01}
Amerijckx, C., Verleysen, M., Thissen, P., Legat, J.D.: Image compression by self-organized Kohonen map. IEEE Transactions on Neural Networks, \textbf{9}(3), 503--507 (1998)

\bibitem{garriga01}
Complete C implementation of the Kohonen Neural Network (SOM algorithm), \url{http://github.com/Coding-Sunday-Sofia/Kohonen}. Last accessed 01 Mar 2019

\bibitem{atanasova01}
Atanasova T., Barova M.: Exploratory analysis of Time Series for hypothesize feature values. In: UniTech17 Proceedings,  \textbf{16}(2), 399--403 (2017)

\bibitem{angelova01}
Angelova, V.: Investigations in the Area of Soft Computing Targeted State of the Art Report. Cybernetics and Information Technologies \textbf{9}(1), 18--24 (2009)

\end{thebibliography}
\end{document}