% Part: propositional-logic
% Chapter: syntax-and-semantics
% Section: normal-form

\documentclass[../../../include/open-logic-section]{subfiles}

\begin{document}

\olfileid{pl}{syn}{exp}

\olsection{Expressive adequacy}

We shall now demonstrate the expressive power of propositional logic.

The only primitive connectives we have defined are one-place (i.e.\ `$\lnot$') and two-place (i.e.\ `$\land$', `$\lor$', `$\lif$' and `$\liff$'). But nothing stops us from introducing three-, four-, or five-place connectives; or, more generally, $n$-place connectives, for any number $n$ we like. We might, for example, define a three-place connective, `$\heartsuit$', into existence, by stipulating that it is to have the following characteristic truth table:
\begin{center}
\begin{tabular}{c c c | c}
${!A}$ & ${!B}$ & ${!C}$ & $\heartsuit({!A},{!B},{!C})$\\
\hline
 $\True$  & $\True$  & $\True$  & $\False$ \\
 $\True$  & $\True$  & $\False$ & $\True$  \\
 $\True$  & $\False$ & $\True$  & $\True$  \\
 $\True$  & $\False$ & $\False$ & $\False$ \\
 $\False$ & $\True$  & $\True$  & $\False$ \\
 $\False$ & $\True$  & $\False$ & $\True$  \\
 $\False$ & $\False$ & $\True$  & $\False$ \\
 $\False$ & $\False$ & $\False$ & $\False$
\end{tabular}
\end{center}
Probably this new connective would not correspond with any natural English expression (in the way that `$\land$' corresponds with `and'). But a question arises: if we wanted to employ a connective with this characteristic truth table, must we add a \emph{new} connective? Or can we get by with the connectives we \emph{already have}?

Let us make this question more precise. Say that some connectives are \emph{jointly expressively adequate} \emph{iff}, for any possible truth function, there is a scheme containing only those connectives which expresses that truth function. Since we can represent truth functions using characteristic truth tables, we could equivalently say the following: some connectives are jointly expressively adequate \emph{iff}, for any possible truth table, there is a scheme containing only those connectives with that truth table.

We say `scheme' rather than `!!{formula}', because we are not concerned with something as specific as a !!{formula}. To see why, consider the characteristic truth table for conjunction; this schematically encodes the information that a conjunction $({!A} \land {!B})$ is true iff both ${!A}$ and ${!B}$ are true (whatever ${!A}$ and ${!B}$ might be). When we discuss expressive adequacy, we are considering something at the same level of generality.

The general point is, when we are armed with some jointly expressively adequate connectives, no truth function lies beyond our grasp.
	\begin{thm}\ollabel{thm:expressive}
		The following pairs of connectives are jointly expressively adequate:
			\begin{itemize}
				\item `$\lnot$' and `$\lor$'
				\item `$\lnot$' and `$\land$'
				\item `$\lnot$' and `$\lif$'
			\end{itemize}
			\begin{proof}
				Given any truth table, we can use the method of proving the DNF Theorem (or the CNF Theorem) via truth tables, to write down a scheme which has the same truth table. For example, employing the truth table method for proving the DNF Theorem, I can tell you that the following scheme has the same characteristic truth table as $\heartsuit({!A},{!B},{!C})$, above:
		$$({!A} \land {!B} \land \lnot {!C}) \lor ({!A} \land \lnot{!B} \land {!C}) \lor (\lnot {!A} \land {!B} \land \lnot {!C})$$
			It follows that the connectives $\lnot$', `$\lor$' and `$\land$' are jointly expressively adequate.

			We now show that there is an equivalent scheme which contains only `$\lnot$' and `$\lor$'. To show do this, we simply consider the following equivalence:
		\begin{align*}
		({!A} \land {!B}) &\approx \lnot(\lnot {!A} \lor\lnot {!B})
		\end{align*}
		(The details are left as an exercise).

		For the joint expressive adequacy of `$\lnot$' and `$\land$' we note that:
		\begin{align*}
		({!A} \lor {!B}) &\approx \lnot(\lnot {!A} \land\lnot {!B})
		\end{align*}

		To get the last result we note that:
		\begin{align*}
		({!A} \lor {!B}) &\approx (\lnot {!A} \lif{!B})\\
		({!A} \land {!B}) &\approx \lnot({!A} \lif \lnot{!B})
		\end{align*}
			\end{proof}
	\end{thm}\noindent
In short, there is never any \emph{need} to add new connectives. Indeed, there is already some redundancy among the connectives we have: we could have made do with just two connectives, if we had been feeling really austere.

In fact, some two-place connectives are \emph{individually} expressively adequate. These connectives are among the standard ones, since they are rather cumbersome to use. But their existence shows that, if we had wanted to, we could have defined a truth-functional language that was expressively adequate, which contained only a single primitive connective.

The first such connective we shall consider is `$\uparrow$', which has the following characteristic truth table.
\begin{center}
\begin{tabular}{c c | c}
${!A}$ & ${!B}$ & ${!A} \mathrel{\uparrow} {!B}$\\
\hline
 T & T & F \\
 T & F & T \\
 F & T & T  \\
 F & F & T
\end{tabular}
\end{center}
 This is often called `the Sheffer stroke', after Harry Sheffer, who used it to show how to reduce the number of logical connectives in Russell and Whitehead's \emph{Principia Mathematica}. It is quite common, as well, to call it `nand', since its characteristic truth table is the negation of the truth table for `$\land$'.
\begin{prop}\ollabel{prop:upexpressive}`$\uparrow$' is expressively adequate all by itself.
	\begin{proof}
		\Olref{thm:expressive} tells us that `$\lnot$' and `$\lor$' are jointly expressively adequate. So it suffices to show that, given any scheme which contains only those two connectives, we can rewrite it as a semantically equivalent scheme which contains only `$\uparrow$'. As in the proof of the subsidiary cases of \olref{thm:expressive}, then, we simply apply the following equivalences:
		\begin{align*}
			\lnot {!A} &\approx ({!A} \uparrow {!A})\\
			({!A} \lor {!B}) & \approx (({!A} \uparrow {!A}) \uparrow ({!B} \uparrow {!B}))
		\end{align*}
	\end{proof}
\end{prop}\noindent
Similarly, we can consider the connective `$\downarrow$':
\begin{center}
\begin{tabular}{c c | c}
${!A}$ & ${!B}$ & ${!A} \mathrel{\downarrow} {!B}$\\
\hline
 T & T & F \\
 T & F & F  \\
 F & T & F  \\
 F & F & T
\end{tabular}
\end{center}
This is sometimes called the `Peirce arrow' (Peirce himself called it `ampheck'). More often, though, it is called `nor', since its characteristic truth table is the negation of `$\lor$'.
	\begin{prop}\ollabel{prop:downexpressive}
	`$\downarrow$' is expressively adequate all by itself.
	\begin{proof}
	As in \olref{prop:upexpressive}, although invoking the dual equivalences:
		\begin{align*}
			\lnot {!A} &\approx ({!A} \downarrow {!A})\\
			({!A} \land {!B}) & \approx (({!A} \downarrow {!A}) \downarrow ({!B} \downarrow {!B}))
		\end{align*}
	\end{proof}
\end{prop}

\section{Failures of expressive adequacy}
 In fact, the \emph{only} two-place connectives which are individually expressively adequate are `$\uparrow$' and `$\downarrow$'. But how would we show this? More generally, how can we show that some connectives are \emph{not} jointly expressively adequate?

The obvious thing to do is to try to find some truth table which we \emph{cannot} express, using just the given connectives. But there is a bit of an art to this. Moreover, in the end, we shall have to rely upon induction; for we shall need to show that \emph{no} scheme -- no matter how \emph{long} -- is capable of expressing the target truth table.

 To make this concrete, let's consider the question of whether `$\lor$' is expressively adequate all by itself. After a little reflection, it should be clear that it is not. In particular, it should be clear that any scheme which only contains disjunctions cannot have the same truth table as negation, i.e.:
				\begin{center}
				\begin{tabular}{c | c}
				${!A}$ & $\lnot {!A}$\\
				\hline
				 $\True$  & $\False$ \\
				 $\False$ & $\True$
				\end{tabular}
				\end{center}
The intuitive reason, why this should be so, is simple: the top line of the desired truth table needs to have the value False; but the top line of any truth table for a scheme which \emph{only} contains disjunctions will always be True. But so far, this is just hand-waving. To make it rigorous, we need to reach for induction. Here, then, is our rigorous proof.
 	\begin{prop}\ollabel{prop:OrNotAdequate}
		`$\lor$' is not expressively adequate by itself.
		\begin{proof}
			Let ${!A}$ by any scheme containing no connective other than disjunctions. Suppose, for induction on length, that every shorter scheme containing only disjunctions is true whenever all its atomic constituents are true. There are two cases to consider:
				\begin{itemize}
					\item ${!A}$ is atomic. Then there is nothing to prove.
					\item ${!A}$ is $({!B} \lor {!C})$, for some schemes ${!B}$ and ${!C}$ containing only disjunctions. Then, since ${!B}$ and ${!C}$ are both shorter than ${!A}$, by the induction hypothesis they are both true when all their atomic constituents are true. Now the atomic constituents of ${!A}$ are just the constituents of both ${!B}$ and ${!C}$, and ${!A}$ is true whenever ${!B}$ and ${!C}$. So ${!A}$ is true when all of its atomic constituents are true.
				\end{itemize}
			It now follows, by induction on length, that any scheme containing no connective other than disjunctions is true whenever all of its atomic constituents are true. Consequently, no scheme containing only disjunctions has the same truth table as that of negation. Hence `$\lor$' is not expressively adequate by itself.
		\end{proof}
	\end{prop}\noindent

In fact, we can generalise \olref{prop:OrNotAdequate}:
	\begin{thm}\ollabel{thm:Ampheck}The \emph{only} two-place connectives that are expressively adequate by themselves are `$\uparrow$' and `$\downarrow$'.
		\begin{proof}
			There are sixteen distinct two-place connectives. We shall run through them all, considering whether or not they are individually expressively adequate, in four groups.

			\emph{Group 1: the top line of the truth table is True.} Consider those connectives where the top line of the truth table is True. There are eight of  these, including `$\land$', `$\lor$', `$\lif$' and `$\liff$', but also the following:
	\begin{center}
		\begin{tabular}{c c | c c c c}
		${!A}$ & ${!B}$ & ${!A} \mathrel{\circ_1} {!B}$ & ${!A} \mathrel{\circ_2} {!B}$ & ${!A} \mathrel{\circ_3} {!B}$ & ${!A} \mathrel{\circ_4} {!B}$\\
		\hline
			 $\True$  & $\True$  & $\True$  & $\True$  & $\True$  & $\True$  \\
			 $\True$  & $\False$ & $\True$  & $\True$  & $\True$  & $\False$ \\
			 $\False$ & $\True$  & $\True$  & $\False$ & $\False$ & $\True$  \\
			 $\False$ & $\False$ & $\True$  & $\True$  & $\False$ & $\False$
	\end{tabular}
	\end{center}
	(obviously the names for these connectives were chosen arbitrarily). But, exactly as in Proposition \olref{prop:OrNotAdequate}, none of these connectives can express the truth table for negation. So there is a connective whose truth table they cannot express. So none of them is individually expressively adequate.

			\emph{Group 2: the bottom line of the truth table is False.} Having eliminated eight connectives, eight remain. Of these, four are false on the bottom line of their truth table, namely:
	\begin{center}
		\begin{tabular}{c c | c c c c}
		${!A}$ & ${!B}$ & ${!A} \mathrel{\circ_5} {!B}$ & ${!A} \mathrel{\circ_6} {!B}$ & ${!A} \mathrel{\circ_7} {!B}$ & ${!A} \mathrel{\circ_8} {!B}$\\
		\hline
			 $\True$  & $\True$  & $\False$ & $\False$ & $\False$ & $\False$ \\
			 $\True$  & $\False$ & $\True$  & $\True$  & $\False$ & $\False$ \\
			 $\False$ & $\True$  & $\True$  & $\False$ & $\True$  & $\False$ \\
			 $\False$ & $\False$ & $\False$ & $\False$ & $\False$ & $\False$
	\end{tabular}
	\end{center}
	As above, though, none of these connectives can express the truth table for negation. To show this we prove that any scheme whose only connective is one of these (perhaps several times) is false whenever all of its atomic constituents are false. We can show this by induction, exactly as in Proposition \olref{prop:OrNotAdequate} (I leave the details as an exercise).

		\emph{Group 3: connectives with redundant positions.}
		Consider two of the remaining four connectives:

	\begin{center}
		\begin{tabular}{c c | c c}
		${!A}$ & ${!B}$ & ${!A} \mathrel{\circ_9} {!B}$ & ${!A} \mathrel{\circ_{10}} {!B}$\\
		\hline
			 $\True$  & $\True$  & $\False$ & $\False$ \\
			 $\True$  & $\False$ & $\False$ & $\True$  \\
			 $\False$ & $\True$  & $\True$  & $\False$ \\
			 $\False$ & $\False$ & $\True$  & $\True$
	\end{tabular}
	\end{center}
	These connectives have redundant positions, in the sense that the truth value of the overarching scheme only depends upon the truth value of one of the atomic constituents. More precisely:
		\begin{align*}
		 	{!A} \circ_9 {!B} &\approx \lnot {!A}\\
			{!A} \circ_{10} {!B} &\approx \lnot {!B}
		\end{align*}
		Consequently, there are many truth functions that they cannot express. In particular, they cannot express either the tautologous truth function (given by `$\circ_1$'), or the contradictory truth function (given by `$\circ_8$'). To show this, it suffices to prove that any scheme whose only connective is either `$\circ_9$' or `$\circ_{10}$' (perhaps several times) is contingent, i.e.\ it is true on at least one line and false on at least one other line. We leave the details of this proof as an exercise.

		\emph{Group 4.} Only two connectives now remain, namely `$\uparrow$' and `$\downarrow$', and 	Propositions \olref{prop:upexpressive} and \olref{prop:downexpressive} show that both are individually expressively adequate.
		\end{proof}
	\end{thm}

\begin{prob}
	Let \( \diamondsuit \) be the ternary connective introduced in an earlier problem. %\olref[pl][syn][val]{prob:TruthTable}.
	Prove the connectives \( \lfalse \), \( \ltrue \) and \( \diamondsuit \) are jointly expressively adequate.
\end{prob}

\begin{prob}
 Where `$\circ_7$' has the characteristic truth table defined in the proof of \olref[pl][syn][exp]{thm:Ampheck}, show that the following are jointly expressively adequate:
	\begin{enumerate}
		\item `$\circ_7$' and `$\lnot$'. % $\lnot (B \circledcirc A)$ expresses $A \lif B$.
		\item `$\circ_7$' and `$\lif$'. % $A \circledcirc (B \lif A)$ expresses $A \downarrow B$.
		\item `$\circ_7$' and `$\liff$'. % $A \circledcirc (A \liff B)$ expresses $A \downarrow B$.
	\end{enumerate}
\end{prob}

\begin{prob}
Show that the connectives `$\circ_7$', `$\land$' and `$\lor$' are not jointly expressively adequate.\\
\end{prob}

\begin{prob}
Complete the proof of \olref[pl][syn][exp]{thm:expressive}.
\end{prob}

 \end{document}


\chapter{Introduction}
\label{chp:introduction}
Formally, there are 2 parts and 8 chapters in this thesis. The first 4 chapters, namely chapter 2-4, mainly refer to some reviews for Galois theory and Algebraic Number theory etc. In chapter 6-8, we obtain some results on cyclic sextic fields and Galois extensions of function fields. And then, we also give some examples using our consequences.

Algebraic Number Theory and Algebraic Geometry are two central researching frontiers of pure mathematics. To find the discriminant, integral basis, class number of a algebraic number field is a classical question in algebraic number theory. More accurately, if we consider the splitting field of the polynomials over $\mathbb{Q}$, which is certainly Galois, then some restrictions from Galois extension will affect the structures of the field. Igor Shafarevich showed that every finite solvable group $G$ is realizable over $\mathbb{Q}$, i.e. there exists a field $K$ such that $\operatorname{Gal}(K/\mathbb{Q})\cong G$. This is related to a famous question, the Inverse Galois Problem. For our cases, we focus on some simple cyclic fields which have cyclic group as its Galois group over $\mathbb{Q}$.

We introduce Galois theory in chapter \ref{chap:chap-three}. The Galois theory is the principal connection between the two parts of the thesis. In chapter \ref{chap:chap-three}, we will first introduce some necessary preliminaries of Galois Theory for our results based on Emil Artin's book \citep{artin1944galois} and David A. Cox's book\citep{cox2012galois}. Then, we focus on computing the Galois group of a polynomial. We sort out some useful materials from A. Healy \citep{healy2002resultants}, C. Bright \citep{bright2013computing}, and L. Soicher and J. McKay \citep{soicher1985computing}.

One will find that chapter 3-5 have almost the same content's structure, i.e. we have several common sections like the discriminant, integral basis, decomposition of prime, unit group and class number and so on. In fact, Chapter 3 is the reviews of general theory for number fields and some analytic number theory. We have paid much time on sorting out the materials from books of Prof. Xianke Zhang \citep{Xianke2006ANT}, Henri Cohen \citep{cohen1993course} and Richard Molin \citep{mollin1999algebraic}. In chapter 4 and 5, we have clearly rearranged those results for quadratic field and cyclic cubic field based on Cohen and Zhang's books. Some of results has been modified for the simplicity. In chapter 5, we have posed an example for prime decomposition in cyclic cubic field and two examples for computing the class number of those fields. What's more, we have recovered the results of Seidelmann's paper \citep{seidelmann1917gesamtheit} through a lemma in Cohen's book. We also give a formula (See theorem \ref{thm:ccuformula}) for a type of cyclic cubic field which is given risen by the ideas of F.C. Orvay's \citep{orvay1991cyclic}.

In chapter 6, we first refer to Sirpa M{\"a}ki's results \citep{maki1980determination} on discriminant and conductor of a cyclic sextic field, and then get the integral basis and prime decomposition of it.  M{\"a}ki give a direct result for discriminant, we have tried to recover the result to get it using the conductor-discriminant formula. Then with this message, we complete to find the integral basis of cyclic sextic field. At section \ref{sec:primdsex}, we succeed in obtaining all the cases for decomposition of prime numbers. For real cyclic cubic field, the unit group and class number has been solved for some ``small" (actually is quite large) discriminants, we can find a table in M{\"a}ki's book. For complex cyclic sextic field, it's a CM-field, hence the class number and the unit group could be reduced into its cyclic cubic field. But unfortunately, we haven't got the final precise results of them.

In chapter 7, we give two examples. One of them is a complex cyclic sextic field and the other is a real cyclic sextic field. For this a complex cyclic sextic field, i.e. 7-th cyclotomic field, we use our results in chapter 6 to get its discriminant and the prime decomposition, integral basis. Then we verify those results through the theory of
cyclotomic field. Since this field is quite simple, we use the general theory of class number to find its class number is 1. Then, we also given an inconspicuous example. We first verify the Galois group of the polynomial using the method in chapter 2, then we first compute the polynomial discriminant. After that, using the discriminant formula, we confirm the subfields of it, and also do other processes as we mentioned above except the unit group. We also find another example proposed by A Bremner and B Spearman\citep{bremner2010cyclic} with sextic trinomial, but unfortunately, we haven't got the final results.

Although there is only one chapter for part two, i.e. the Galois extensions in a function field, this is still an important part of my thesis. We have proved two theorem for specializing L\"{u}roth's theorem within Galois extension. More precisely, assuming that $K(x)/E$ is Galois, without using L\"{u}roth's theorem, we prove that $E=F(u)$, where $u\in K(x)$ can be determined by the elementary symmetric polynomials. We then give a classical example for $\operatorname{Gal}(K(x)/E)=D_3$.


\documentclass{article}
\usepackage{fullpage}
\usepackage{nopageno}
\usepackage{amsmath}
\usepackage{amssymb}
\allowdisplaybreaks

\newcommand{\abs}[1]{\left\lvert #1 \right\rvert}

\begin{document}
\title{Notes}
\date{March 3, 2014}
\maketitle
\begin{align*}
  L&=\text{length}\\
  \alpha ^2&=\text{diffusion}\\
  &=\left[\frac{\text{cm}^2}{\text{sec}}\right]\\
\end{align*}
homework, in \#20 we are deriving when change of variables will and won't work. \#21 is deriving a little more complicated version for the remaining cases.

oh snap the equation i couldn't read last time was the gamma function. $\Gamma(x)=\int_0^\infty{e^{-t}t^{x-1}}$. We understan $n!$ what is $x!$
\begin{align*}
  n!&=\int_0^\infty{e^{-t}t^{x-1}\,\mathrm{d}t}\\
  x!&=\int_0^\infty{e^{-t}t^{x}\,\mathrm{d}t},\,x>-1\\
  \Gamma(n+1)&=n!\\
  \Gamma\left(\frac{1}{2}\right)&=\pi^{1/2}\\
  \Gamma(x+1)&=x\Gamma(x)\\
  t^p&\to\frac{\Gamma(p+1)}{s^{p+1}}
\end{align*}
okay on to dlmf.nist.gov
handbook of mathematical functions? written/editted by by abramowitz and stegan. part of a government project to get a standardized reference of mathematical functions. update to it is NIST Handbook of Mathematical Functions. Which is precisely this web site. \emph{THE} reference for special functions.
reference we want is 5.2 and 5.3, famma function. 5.12 beta function is relevant to homework exercises.

\section*{lesson 13}
page 102

obtained $U(x,s)=u_0\left(\frac{1}{s}-\frac{\sqrt{s}}{s(\sqrt{s}+1)}e^{-x\sqrt{s}}\right)$. Text claims that $u(x,t)=u_0(1-(\text{erfc}(\frac{x}{2\sqrt{2}})-\text{erfc}(\sqrt{t}+\frac{x}{2\sqrt{t}})e^{x+t})$. The text tables are not adequate. Mathematica does not handle it.

\emph{note:}
\begin{align*}
  &\qquad\frac{\sqrt{s}}{s(\sqrt{s}+1)}e^{-a\sqrt{s}}&(a>0)\\
  &=\frac{1}{\sqrt{s}(\sqrt{s}+1)}e^{-a\sqrt{s}}\\
  &=(\frac{1}{\sqrt{s}}-\frac{1}{\sqrt{s}+1})e^{-a\sqrt{s}}
\end{align*}
\subsection*{case 1}
\begin{align*}
  F(s)&=\frac{1}{\sqrt{s}}e^{-\sqrt{s}}\to f(t)\text{? in table}
\end{align*}
approach
\begin{align*}
  G(s)&=e^{-\sqrt{s}}\to g(t)\\
  \intertext{\emph{note}}
  \frac{\mathrm{d}}{\mathrm{d}s}(e^{-\sqrt{s}})&=e^{-\sqrt{s}}\cdot-\frac{1}{2}\frac{1}{\sqrt{s}}=-\frac{1}{2}F(s)\\
  \frac{\mathrm{d}}{\mathrm{d}s}(e^{-\sqrt{s}})&=\frac{\mathrm{d}}{\mathrm{d}s}(G(s))\to -tg(t)=-\frac{1}{2}f(t)\\
  G'(s)&=-\frac{1}{2}s^{-1/2}e^{-\sqrt{s}}\to -tg(t)\\
  \vdots\\
  4sG''(s)+2G'(s)-G(s)&=0\\
  4sG''(s)-t^2g(t)\mid_{t=0}+2G'(s)-G(s)&=0\\
  4\frac{\mathrm{d}}{\mathrm{d}t}\left[t^2g(t)\right]+2(-tg(t)-g(t)&=0\\
  4t^2\frac{\mathrm{d}g}{\mathrm{d}t}+6tg(t)-g(t)&=0\\
  \frac{\mathrm{d}g}{\mathrm{d}t}+\left(\frac{3}{2t}-\frac{1}{4t^2}\right)g&=0\\
  \intertext{integrating factor}
  \mu &=t^{3/2}\cdot e^{1/4t}
\end{align*}
\end{document}


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

\marginpar{Friday\\ 2020-5-22, \\ compiled \\ \today}

% We are discussing LISA.
\subsubsection{Driving requirements}

Let us give an estimate for the required sensitivity to see an Extreme Mass Ratio Inspiral, a typical kind of signal.
This would be characterized by an amplitude \(h \sim \num{e-22}\), a frequency of \(f \sim \SI{10}{mHz}\). The number of cycles we can expect to see is around \(N _{\text{cycles}} \sim 100\), so we could observe the source for around \(N _{\text{cycles}} / f \approx \SI{e4}{s}\).

So the amplitude spectral density at \SI{10}{mHz} should be around
%
\begin{align}
S^{1/2}_{h} \qty(\SI{10}{mHz}) \sim h \sqrt{T} \sim \SI{e-20}{Hz^{-1/2}}
\,.
\end{align}

If the arm length is around \(L \sim \lambda_{GW} / 4 \sim \num{e9} \divisionsymbol \SI{e10}{m}\), then we will need an amplitude noise spectral density for the length measurements on the order of
%
\begin{align}
S^{1/2}_{L} \sim S^{1/2}_{h} L \sim \SI{e-11}{m / \sqrt{Hz}}
\,.
\end{align}

Let us discuss the \textbf{noise sources} of LISA: at \textbf{high frequency} the limit is \textbf{shot noise}, since very few photons can arrive.

This limit is distance-independent! The ASD on the length \(S^{1/2}_{L}\) scales like \(N_p^{-1/2}\) (because of Poisson statistics), and the number of photon received by a constant-area telescope scales like \(N_p \sim L^{-2}\), so in the end we will have
%
\begin{align}
S^{1/2}_{h} \sim \frac{S^{1/2}_{L}}{L} \sim \frac{L}{L} \sim L^{0}
\,.
\end{align}

If we want to design our detector in order to be able to see such a signal, how much power do we need to see with our telescope? We need to impose
%
\begin{align}
\SI{e-11}{m / \sqrt{Hz}} \gtrsim
S^{1/2}_{L} \sim \frac{\lambda }{2 \pi} \frac{1}{\sqrt{N_p}}
\,,
\end{align}
%
which we can solve to find that, if we use photons around the visible range of the spectrum, that we need about \SI{3e8}{Hz} of photons.
This corresponds to a received power of about \SI{50}{pW}; the least amount of power that can be sent in order to receive this much is limited by the intrinsic divergence of a Gaussian beam to
%
\begin{align}
P _{\text{sent}} \geq \frac{2 \lambda^2 L^2}{D^{4}} P _{\text{received}}
\,,
\end{align}
%
where \(D\) is the diameter of the telescope, \(\lambda \) is the wavelength of the light, while \(L\) is the distance between the spacecrafts. This gives us a least amount of power of around \SI{100}{mW}; to have a margin we transmit \SI{1}{W}.

At \textbf{low frequency} the limit is given by our ability to keep the test masses in free-fall.
By design, this matches shot noise around \SI{3}{mHz}.
If the forces are independent of frequency, then we use \(a = \omega^2 L\); this means that we need to set
%
\begin{align}
S^{1/2}_{a} ( f = \SI{3}{mHz}) = (2 \pi f)^2 L \sim \SI{5e-15}{m/s^2 / \sqrt{Hz}}
\,.
\end{align}

This is for both masses in an interferometer combined; for a single one the requirement is relaxed by \(\sqrt{2}\).
The three spacecrafts orbit near Earth in an equilateral triangle with \( L \approx \SI{2.5e9}{m}\), inclined by about \SI{60}{\degree} from the ecliptic.
These distances and angles oscillate by a bit in the orbit; this has little effect on the scientific operation, but it creates a great problem for the engineering.

This setup has several advantages: it is \textbf{passive} (no active stabilization means one less source of errors and problems), has approximately \textbf{constant orbital radius}, excludes the Sun from the telescope's FOV, and the antenna pattern sweeps the sky predictably  in the year (so, with a \(\pi^{-1}\times\SI{e-7}{Hz}\) period).

\subsubsection{Spacecraft design}

The spacecrafts need to operate \textbf{drag-free}, following the test mass. Unlike most scientific missions, the spacecraft is a crucial part of the scientific investigation.
Each spacecraft is equipped with \textbf{two test masses}, which makes the optical setup easier and provides redundancy.
The spacecrafts have \SI{}{\micro N} thrusters which allow them to maintain their pointing direction.

We also have the \textbf{Gravitational Reference System}, which is the readout system for the test masses' position.
This uses capacitors, whose capacitance depends on the distance of the test mass to the faces of the spacecraft.

\subsubsection{Long-range interferometry}

The fraction of the transmitted signal which is actually received is tiny, of the order of \num{e-9}.
So, we use a so-called \textbf{transponder scheme}: the outgoing laser is phase-locked to the incoming one.

We cannot make the beams interfere directly --- for one, their frequencies differ by the Doppler shift.
So, we do interferometry indirectly --- this is called \textbf{Time-Delayed Interferometry}.
We measure the phases of the laser beams using \textbf{heterodyne detectors}, and interfere them in post-processing.
The way to do this is to interfere two beams with slightly different frequencies locally --- the pulsations will then be slow (\SI{}{kHz} to \SI{}{GHz}), so we will be able to record them precisely.
One of the two beams is a reference beam we set up locally, the other one is the incoming one.

We do not bounce lasers from the test masses directly, we have test mass-spacecraft and spacecraft-spacecraft links.

\subsection{Pulsar Timing Array}

Mergers of SuperMassive Black Holes are very low-frequency: the frequency of the GW at the ISCO is given by
%
\begin{align}
f _{\text{GW, ISCO}} = \frac{1}{6 \sqrt{6} \pi } \frac{c^3}{GM}
\,,
\end{align}
%
which, for SMBHs with \(M > \num{e8} M_{\odot}\), means \(f < \SI{e-4}{Hz}\).
The frequency for the earlier stages is even lower, with periods of the order of several years!

\textbf{Pulsar Timing Array} is a proposed method of measuring these signals.
% We seek a method to measure SMBH mergers and other extremely long wavelength GW.
The idea is to measure the distance from millisecond pulsars over a long period of time, subtract out all the known distortions to time-of-arrival, and look for correlations in the remaining residuals.

The light travel time depends on how the space is curved by GW.

The key to the data analysis is that the GW signal is one of the only correlated signals across the sky. The contribution to the ToA delay for pulsar \(\alpha \) is
%
\begin{align}
r_{\alpha , GW} (t) = \int_{0}^{t} \dd{t'} \frac{ \delta \nu _\alpha }{\nu _\alpha } (t')
r_{\alpha }^{p} (t) - r^{a}_{\alpha } (t)
\,,
\end{align}
%
where
%
\begin{align}
\frac{ \delta \nu_{\alpha }}{\nu_{\alpha }} = \frac{1}{2} \frac{\hat{p}^{i}_{\alpha } \hat{p}^{j}_{\alpha }}{1 + \hat{p}_{\alpha } \cdot \hat{\Omega}} \Delta h_{ij}
\,,
\end{align}
%
where \(\hat{\Omega}\) is the unit vector in the direction of the \textbf{source}, while \(\hat{p}_{\alpha }\) is the unit vector in the direction of the pulsar. \(\Delta h_{ij} \) is the \emph{difference} in strain between emission and reception, and finally the pulsar term, which is the \emph{uncorrelated} one in our data, is
%
\begin{align}
t^{p}_{\alpha } = t - L_\alpha (1 + \hat{p}_{\alpha } \cdot \hat{\Omega})
\,.
\end{align}

On the other hand, \(t^{e}_{\alpha }\) is the correlated part of the signal, measured at the Earth.
Note that this means that there is a great deal of \textbf{averaging effect} in PTA, the only effect we can see is \(\Delta h_{ij}\), we gain no information about the value of the field at any intermediate point.

% Here \(\alpha \) is an index representing which pulsar we are interested in.
% We can divide the signal \(r\) into a part at Earth,  \(r^{e}_{\alpha }(t)\), and a part at the pulsar, \(r^{p}_{\alpha }(t)\).

% \todo[inline]{Is there an averaging effect in PTA? If the GW is propagating in the same direction as the pulsar signal the signal is always in the same gravitational field\dots not clear really}

We need to keep account of the fact that if we are able to see signals at SMBH merger frequencies, then we could also see a stochastic background of \emph{unresolved} sourced, which could be SMBHs or something else.
Generally, this is modelled as a powerlaw, \(S_{GW} \sim f^{\gamma }\), where \(\gamma \sim - 2/3\) for a SMBH merger background.

The \textbf{Hellings-Downs} shows the expected correlation of residuals as a function of the angle between two pulsars, as long as the background is isotropic.

The data analysis strategy is basically matched filtering on the ToA residuals; the likelihood can be written in terms of the  correlation matrix, \(C(\vec{\lambda})\). This matrix is diagonal if there is no correlation, block diagonal in the presence of correlation, and in a general non-diagonal form if there is a generic GW background.

The thing which is done for ground-based interferometers, using a template bank, cannot work here since we have too many parameters: beyond the GW ones, all the parameters of the various pulsars!

Clever data analysis techniques are needed.

\subsection{Atom interferometry}

Using a laser we can put atoms in superpositions of momentum states, \(\ket{p}\) and \(\ket{p + k}\); by the way we pulse the laser we can determine whether we move the atoms to a superposition or from one state to the other.

So, the idea is the following: we start from all the atoms having a certain momentum, and then
\begin{enumerate}
    \item put them in a superposition \(\ket{p} + \ket{p+k}\), let them propagate for a bit (at their respective velocities) (``beamsplitter'');
    \item invert the population: map \(\ket{p}\) into \(\ket{p + k}\) and vice versa, let them propagate for a bit again (same time as before) (``mirror'');
    \item apply the superposition-creating beam again (``beamplitter'');
    \item measure!
\end{enumerate}

The amount of atoms in either state tells us about their relative phase.
The phase of the laser is affected by GWs, and it can affect the number of atoms we measure with each momentum.

The trick is that the second laser beam is actually the first one, which was reflected by a mirror: so, in the TT gauge its phase is affected by the travel time, which is affected by the presence of a GW.

This kind of detector could go beyond the quantum limits of regular interferometers and, more importantly, at low frequency even on Earth, since they are insensitive to seismic noise (movements in the position of the mirror cancel out).
Also, it might be able to reject Newtonian noise better than regular interferometers.

The current state-of-the-art, however, is still not close to being useful for actual GW detection.
There are several technical issues to solve: we need an atom cloud at a very low temperature (\(\sim \SI{}{\micro K}\)), so that it does not spread to be larger than the laser beam and so that the Doppler effects due to atom motion  does not create problems.

\end{document}


\chapter{Parameterized Code Translation}
This chapter gives examples of using ROSE's high level loop translation
interfaces to perform parameterized loop transformations, including loop
unrolling, interchanging and tiling.
The motivation is to give users the maximized flexibility to orchestrate
code transformations on the targets they want, the order they
want, and the parameters they want.
One typical application scenario is to support generating desired code
variants for empirical tuning.

The ROSE internal interfaces (declared within the SageInterface namespace) to call loop transformations are:
\begin{itemize}
\item \textit{bool loopUnrolling (SgForStatement *loop, size\_t
unrolling\_factor)}:
This function needs two parameters: one for the loop to be
unrolled and the other for the unrolling factor.
\item \textit{bool  loopInterchange (SgForStatement *loop, size\_t depth,
size\_t lexicoOrder)}:
The loop interchange function has three parameters, the first one to
specify a loop which starts a perfectly-nested loop and is to be
interchanged, the 2nd for the depth of the loop nest to be interchanged, and finally the
lexicographical order for the permutation.
\item \textit{bool  loopTiling (SgForStatement *loopNest, size\_t
targetLevel, size\_t tileSize)}
The loop tiling interface needs to know the loop nest to be tiled, which
loop level to tile, and the tile size for the level.
\end{itemize}
For efficiency concerns, those functions only perform the specified
translations without doing any legitimacy check.
It is up to the users to
make sure the transformations won't generate wrong code.
We will soon provide interfaces to do the eligibility check for each
transformation.

We also provide standalone executable programs
(loopUnrolling,loopInterchange, and loopTiling under ROSE\_INSTALL/bin) for the
transformations mentioned above so users can directly use them via command
lines and abstract handles (explained in Chapter~\ref{chap:handles}) to orchestrate transformations they want.
%=====================================
\section{Loop Unrolling}
Figure~\ref{Tutorial:exampleInputCode_LoopUnrollingp} gives an example
input code for loopUnrolling.

\begin{figure}[!h]
{\indent
  {\mySmallFontSize
      \begin{latexonly}
    \lstinputlisting{\TOPSRCDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/inputloopUnrolling.C}
    \end{latexonly}
      \begin{htmlonly}
    \verbatiminput{\TOPSRCDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/inputloopUnrolling.C}
    \end{htmlonly}
  }
}
\caption{Example source code used as input to loopUnrolling }
    \label{Tutorial:exampleInputCode_LoopUnrollingp}
\end{figure}

An example command line to invoke loop unrolling on the example can look
like the following:
\begin{verbatim}
# unroll a for statement 5 times. The loop is a statement at line 6 within
# an input file.
loopUnrolling -c inputloopUnrolling.C \
-rose:loopunroll:abstract_handle "Statement<position,6>" -rose:loopunroll:factor 5
\end{verbatim}

Two kinds of output can be expected after loop unrolling.
One (Shown in Figure~\ref{Tutorial:exampleOutput_LoopUnrollingpEven}) is the case that the loop iteration count is known at compile-time and
can be evenly divisible by the unrolling factor.
The other case (Shown in
Figure~\ref{Tutorial:exampleOutput_LoopUnrollingpNonEven} is when the divisibility is unknown and a fringe loop has to
be generated to run possible leftover iterations.
%----------------------------- evenly divisible case------------
\begin{figure}[!h]
{\indent
  {\mySmallFontSize
      \begin{latexonly}
    \lstinputlisting{\TOPBUILDDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/rose_inputloopUnrolling1.C}
    \end{latexonly}
      \begin{htmlonly}
    \verbatiminput{\TOPBUILDDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/rose_inputloopUnrolling1.C}
    \end{htmlonly}
  }
}
\caption{Output for a unrolling factor which can divide the iteration space evenly}
    \label{Tutorial:exampleOutput_LoopUnrollingpEven}
\end{figure}
%----------------------------- non evenly divisible case------------
\begin{figure}[!h]
{\indent
  {\mySmallFontSize
      \begin{latexonly}
    \lstinputlisting{\TOPBUILDDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/rose_inputloopUnrolling2.C}
    \end{latexonly}
      \begin{htmlonly}
    \verbatiminput{\TOPBUILDDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/rose_inputloopUnrolling2.C}
    \end{htmlonly}
  }
}
\caption{Output for the case when divisibility is unknown at compile-time}
    \label{Tutorial:exampleOutput_LoopUnrollingpNonEven}
\end{figure}

%========================================================
\clearpage % enforce all previous figures to be shown
\section{Loop Interchange}

Figure~\ref{Tutorial:exampleInputCode_LoopInterchangep} gives an example
input code for loopInterchange.

\begin{figure}[!h]
{\indent
  {\mySmallFontSize
      \begin{latexonly}
    \lstinputlisting{\TOPSRCDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/inputloopInterchange.C}
    \end{latexonly}
      \begin{htmlonly}
    \verbatiminput{\TOPSRCDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/inputloopInterchange.C}
    \end{htmlonly}
  }
}
\caption{Example source code used as input to loopInterchange}
    \label{Tutorial:exampleInputCode_LoopInterchangep}
\end{figure}

An example command line to invoke loop interchange:
\begin{verbatim}
# interchange a loop nest starting from the first loop within the input file,
# interchange depth is 4 and
# the lexicographical order is 1 (swap the innermost two levels)
loopInterchange -c inputloopInterchange.C -rose:loopInterchange:abstract_handle \
"ForStatement<numbering,1>" -rose:loopInterchange:depth 4 \
-rose:loopInterchange:order 1
\end{verbatim}

Figure~\ref{Tutorial:exampleOutput_LoopInterchangep} shows the output.
%------------------------------------------
\begin{figure}[!h]
{\indent
  {\mySmallFontSize
      \begin{latexonly}
    \lstinputlisting{\TOPBUILDDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/rose_inputloopInterchange.C}
    \end{latexonly}
      \begin{htmlonly}
    \verbatiminput{\TOPBUILDDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/rose_inputloopInterchange.C}
    \end{htmlonly}
  }
}
\caption{Output for loop interchange}
    \label{Tutorial:exampleOutput_LoopInterchangep}
\end{figure}

%========================================================
\clearpage
\section{Loop Tiling}
Figure~\ref{Tutorial:exampleInputCode_LoopTilingp} gives an example
input code for loopTiling.

\begin{figure}[!h]
{\indent
  {\mySmallFontSize
      \begin{latexonly}
    \lstinputlisting{\TOPSRCDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/inputloopTiling.C}
    \end{latexonly}
      \begin{htmlonly}
    \verbatiminput{\TOPSRCDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/inputloopTiling.C}
    \end{htmlonly}
  }
}
\caption{Example source code used as input to loopTiling}
    \label{Tutorial:exampleInputCode_LoopTilingp}
\end{figure}

An example command line to invoke loop tiling:
\begin{verbatim}
# Tile the loop with a depth of 3 within the first loop of the input file
# tile size is 5
loopTiling -c inputloopTiling.C -rose:loopTiling:abstract_handle \
"ForStatement<numbering,1>" -rose:loopTiling:depth 3 -rose:loopTiling:tilesize 5

\end{verbatim}
Figure~\ref{Tutorial:exampleOutput_LoopTilingp} shows the output.
%------------------------------------------
\begin{figure}[!h]
{\indent
  {\mySmallFontSize
      \begin{latexonly}
    \lstinputlisting{\TOPBUILDDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/rose_inputloopTiling.C}
    \end{latexonly}
      \begin{htmlonly}
    \verbatiminput{\TOPBUILDDIR/tests/nonsmoke/functional/roseTests/astInterfaceTests/rose_inputloopTiling.C}
    \end{htmlonly}
  }
}
\caption{Output for loop tiling}
    \label{Tutorial:exampleOutput_LoopTilingp}
\end{figure}


\input{../header_class}

%---------- start document ---------- %
 \section{algfield -- Algebraic Number Field}\linkedzero{algfield}
 \begin{itemize}
 \item {\bf Classes}
   \begin{itemize}
   \item \linkingone{algfield}{NumberField}
   \item \linkingone{algfield}{BasicAlgNumber}
   \item \linkingone{algfield}{MatAlgNumber}
   \end{itemize}
 \item {\bf Functions}
   \begin{itemize}
   \item \linkingone{algfield}{changetype}
   \item \linkingone{algfield}{disc}
   \item \linkingone{algfield}{fppoly}
%   \item \linkingone{algfield}{prime$\_$decomp}
   \item \linkingone{algfield}{qpoly}
   \item \linkingone{algfield}{zpoly}
   \end{itemize}
 \end{itemize}
%
  \subsection{NumberField -- number field}\linkedone{algfield}{NumberField}
  \initialize
  \func{NumberField}{
    \hiki{f}{list},\
    \hikiopt{precompute}{bool}{False}
  }{
    \out{NumberField}
  }\\
  \spacing
  % document of basic document
  \quad Create NumberField object. \\
  \spacing
  % added document
  \quad This field defined by the polynomial \param{f}. \\
  The class inherits \linkingone{ring}{Field}.\\
  \spacing
  % input, output document
  \quad \param{f}, which expresses coefficients of a polynomial, must be a list of integers.
  \param{f} should be written in ascending order.  \param{f} must be monic irreducible over rational field. \\
  If \param{precompute} is True, all solutions of \param{f} (by \linkingtwo{algfield}{NumberField}{getConj}), the discriminant of \param{f} (by \linkingtwo{algfield}{NumberField}{disc}), the signature (by \linkingtwo{algfield}{NumberField}{signature}) and the field discriminant of the basis of the integer ring (by \linkingtwo{algfield}{NumberField}{integer\_ring}) are precomputed.\\
  \begin{at}
    \item[degree]\linkedtwo{algfield}{NumberField}{degree}: The (absolute) extension degree of the number field.
    \item[polynomial]\linkedtwo{algfield}{NumberField}{polynomial}: The defining polynomial of the number field.
  \end{at}
  \begin{op}
    \verb|K * F| & Return the composite field of \param{K} and \param{F}. \\
    \verb|K == F| & Check whether the equality of \param{K} and \param{F}. \\
  \end{op}
\begin{ex}
>>> K = algfield.NumberField([-2, 0, 1])
>>> L = algfield.NumberField([-3, 0, 1])
>>> print K, L
NumberField([-2, 0, 1]) NumberField([-3, 0, 1])
>>> print K * L
NumberField([1L, 0L, -10L, 0L, 1L])
\end{ex}%Don't indent!
\C
  \method
  \subsubsection{getConj -- roots of polynomial}\linkedtwo{algfield}{NumberField}{getConj}
  \func{getConj}{\param{self}}{\out{list}}\\
  \spacing
  % document of basic document
  \quad Return all (approximate) roots of the \param{self}.\linkingtwo{algfield}{NumberField}{polynomial}. \\
  \spacing
  % add document
  %\spacing
  % input, output document
  \quad The output is a list of (approximate) complex number.\\
%
  \subsubsection{disc -- polynomial discriminant}\linkedtwo{algfield}{NumberField}{disc}
  \func{disc}{\param{self}}{\out{integer}}\\
  \spacing
  % document of basic document
  \quad Return the (polynomial) discriminant of the \param{self}.\linkingtwo{algfield}{NumberField}{polynomial}. \\
  \spacing
  % add document
  \quad \negok The output is not discriminant of the number field itself. \\
  %\spacing
  % input, output document
%
  \subsubsection{integer\_ring -- integer ring}\linkedtwo{algfield}{NumberField}{integer\_ring}
  \func{integer\_ring}{\param{self}}{\out{\linkingone{matrix}{FieldSquareMatrix}}}\\
  \spacing
  % document of basic document
  \quad Return a basis of the ring of integers of \param{self}. \\
  \spacing
  % add document
  \quad \negok The function uses \linkingone{round2}{round2}.\\
  %\spacing
  % input, output document
%
  \subsubsection{field\_discriminant -- discriminant}\linkedtwo{algfield}{NumberField}{field\_discriminant}
  \func{field\_discriminant}{\param{self}}{\out{\linkingone{rational}{Rational}}}\\
  \spacing
  % document of basic document
  \quad Return the field discriminant of \param{self}. \\
  \spacing
  % add document
  \quad \negok The function uses \linkingone{round2}{round2}.\\
  %\spacing
  % input, output document
%
  \subsubsection{basis -- standard basis}\linkedtwo{algfield}{NumberField}{basis}
  \func{basis}{\param{self},\ \hiki{j}{integer}}{\out{\linkingone{algfield}{BasicAlgNumber}}}\\
  \spacing
  % document of basic document
  \quad Return the \param{j}-th basis (over the rational field) of \param{self}. \\
  \spacing
  % add document
  \quad Let $\theta$ be a solution of \param{self}.\linkingtwo{algfield}{NumberField}{polynomial}.
  Then $\theta^j$ is a part of basis of \param{self}, so the method returns them.This basis is called ``standard basis'' or ``power basis''.\\
  %\spacing
  % input, output document
%
  \subsubsection{signature -- signature}\linkedtwo{algfield}{NumberField}{signature}
  \func{signature}{\param{self}}{\out{list}}\\
  \spacing
  % document of basic document
  \quad Return the signature of \param{self}. \\
  \spacing
  % add document
  \quad \negok The method uses Strum's algorithm.\\
  %\spacing
  % input, output document
%
  \subsubsection{POLRED -- polynomial reduction}\linkedtwo{algfield}{NumberField}{POLRED}
  \func{POLRED}{\param{self}}{\out{list}}\\
  \spacing
  % document of basic document
  \quad Return some polynomials defining subfields of \param{self}. \\
  \spacing
  % add document
  \quad \negok ``POLRED'' means ``polynomial reduction''.
  That is, it finds polynomials whose coefficients are not so large.\\
  %\spacing
  % input, output document
%
  \subsubsection{isIntBasis -- check integral basis}\linkedtwo{algfield}{NumberField}{isIntBasis}
  \func{isIntBasis}{\param{self}}{\out{bool}}\\
  \spacing
  % document of basic document
  \quad Check whether power basis of \param{self} is also an integral basis of the field. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
  \subsubsection{isGaloisField -- check Galois field}\linkedtwo{algfield}{NumberField}{isGaloisField}
  \func{isGaloisField}{\param{self}}{\out{bool}}\\
  \spacing
  % document of basic document
  \quad Check whether the extension \param{self} over the rational field is Galois. \\
  %\spacing
  % add document
  \quad \negok As it stands, it only checks the signature.\\
  %\spacing
  % input, output document
%
  \subsubsection{isFieldElement -- check field element}\linkedtwo{algfield}{NumberField}{isFieldElement}
  \func{isFieldElement}{\param{self},\ \hiki{A}{BasicAlgNumber/MatAlgNumber}}{\out{bool}}\\
  \spacing
  % document of basic document
  \quad Check whether \param{A} is an element of the field \param{self}. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
  %\quad The input parameter \param{A} must be an instance of \linkingone{algfield}{BasicAlgNumber} or \linkingone{algfield}{MatAlgNumber}. \\
%
  \subsubsection{getCharacteristic -- characteristic}\linkedtwo{algfield}{NumberField}{getCharacteristic}
  \func{getCharacteristic}{\param{self}}{\out{integer}}\\
  \spacing
  % document of basic document
  \quad Return the characteristic of \param{self}. \\
  \spacing
  % add document
  \quad It returns always zero. The method is only for ensuring consistency.\\
  %\spacing
  % input, output document
%
  \subsubsection{createElement -- create an element}\linkedtwo{algfield}{NumberField}{createElement}
  \func{createElement}{\param{self},\ \hiki{seed}{list}}{\out{BasicAlgNumber/MatAlgNumber}}\\
  \spacing
  % document of basic document
  \quad Return an element of \param{self} with \param{seed}. \\
  \spacing
  % add document
  \quad \param{seed} determines the class of returned element.\\
  For example, if \param{seed} forms as $[[e_1, e_2, \ldots, e_n],\ d]$, then it calls \linkingone{algfield}{BasicAlgNumber}.\\
  %\spacing
  % input, output document
%
\begin{ex}
>>> K = algfield.NumberField([3, 0, 1])
>>> K.getConj()
[-1.7320508075688774j, 1.7320508075688772j]
>>> K.disc()
-12L
>>> print K.integer_ring()
1/1 1/2
0/1 1/2
>>> K.field_discriminant()
Rational(-3, 1)
>>> K.basis(0), K.basis(1)
BasicAlgNumber([[1, 0], 1], [3, 0, 1]) BasicAlgNumber([[0, 1], 1], [3, 0, 1])
>>> K.signature()
(0, 1)
>>> K.POLRED()
[IntegerPolynomial([(0, 4L), (1, -2L), (2, 1L)], IntegerRing()),
IntegerPolynomial([(0, -1L), (1, 1L)], IntegerRing())]
>>> K.isIntBasis()
False
\end{ex}%Don't indent!
\C
  \subsection{BasicAlgNumber -- Algebraic Number Class by standard basis}\linkedone{algfield}{BasicAlgNumber}
  \initialize
  \func{BasicAlgNumber}{
   \hiki{valuelist}{list},\
   \hiki{polynomial}{list},\
   \hikiopt{precompute}{bool}{False}
  }{
   \out{BasicAlgNumber}
  }\\
  \spacing
  % document of basic document
  \quad Create an algebraic number with standard (power) basis. \\
  \spacing
  % added document
  %\spacing
  % input, output document
  \quad $\param{valuelist} = [[e_1, e_2, \ldots, e_n],\ d]$ means $\DS \frac{1}{d}  (e_1 + e_2 \theta + e_3 \theta^2 + \cdots + e_n \theta^{n-1})$,  where $\theta$ is a solution of the polynomial \param{polynomial}.
  Note that $\langle \theta^i \rangle$ is a (standard) basis of the field defining by \param{polynomial} over the rational field.\\
  \spacing
  \quad $e_i,\ d$ must be integers.
  Also, \param{polynomial} should be list of integers. \\
  If \param{precompute} is True, all solutions of \param{polynomial} (by \linkingtwo{algfield}{BasicAlgNumber}{getConj}), approximation values of all conjugates of \param{self} (by \linkingtwo{algfield}{BasicAlgNumber}{getApprox}) and a polynomial which is a solution of \param{self} (by \linkingtwo{algfield}{BasicAlgNumber}{getCharPoly}) are precomputed. \\
  \begin{at}
    \item[value]\linkedtwo{algfield}{BasicAlgNumber}{value}: The list of numerators (the integer part) and the denominator of \param{self}.
    \item[coeff]\linkedtwo{algfield}{BasicAlgNumber}{coeff}: The coefficients of numerators (the integer part) of \param{self}.
    \item[denom]\linkedtwo{algfield}{BasicAlgNumber}{denom}: The denominator of the algebraic number for standard basis.
    \item[degree]\linkedtwo{algfield}{BasicAlgNumber}{degree}: The degree of extension of the field over the rational field.
    \item[polynomial]\linkedtwo{algfield}{BasicAlgNumber}{polynomial}: The defining polynomial of the field.
    \item[field]\linkedtwo{algfield}{BasicAlgNumber}{field}: The number field in which \param{self} is.
  \end{at}
  \begin{op}
    \verb|a + b| & Return the sum of \param{a} and \param{b}. \\
    \verb|a - b| & Return the subtraction of \param{a} and \param{b}. \\
    \verb| - a| & Return the negation of \param{a}. \\
    \verb|a * b| & Return the product of \param{a} and \param{b}. \\
    \verb|a ** k| & Return the \param{k}-th power of \param{a}. \\
    \verb|a / b| & Return the quotient of \param{a} by \param{b}. \\
  \end{op}
\begin{ex}
>>> a = algfield.BasicAlgNumber([[1, 1], 1], [-2, 0, 1])
>>> b = algfield.BasicAlgNumber([[-1, 2], 1], [-2, 0, 1])
>>> print a + b
BasicAlgNumber([[0, 3], 1], [-2, 0, 1])
>>> print a * b
BasicAlgNumber([[3L, 1L], 1], [-2, 0, 1])
>>> print a ** 3
BasicAlgNumber([[7L, 5L], 1], [-2, 0, 1])
>>> a // b
BasicAlgNumber([[5L, 3L], 7L], [-2, 0, 1])
\end{ex}%Don't indent!
\C
  \method
  \subsubsection{inverse -- inverse}\linkedtwo{algfield}{BasicAlgNumber}{inverse}
  \func{inverse}{\param{self}}{\out{BasicAlgNumber}}\\
  \spacing
  % document of basic document
  \quad Return the inverse of \param{self}. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
  \subsubsection{getConj -- roots of polynomial}\linkedtwo{algfield}{BasicAlgNumber}{getConj}
  \func{getConj}{\param{self}}{\out{list}}\\
  \spacing
  % document of basic document
  \quad Return all (approximate) roots of \param{self}.\linkingtwo{algfield}{BasicAlgNumber}{polynomial}. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
  \subsubsection{getApprox -- approximate conjugates}\linkedtwo{algfield}{BasicAlgNumber}{getApprox}
  \func{getApprox}{\param{self}}{\out{list}}\\
  \spacing
  % document of basic document
  \quad Return all (approximate) conjugates of \param{self}. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
  \subsubsection{getCharPoly -- characteristic polynomial}\linkedtwo{algfield}{BasicAlgNumber}{getCharPoly}
  \func{getCharPoly}{\param{self}}{\out{list}}\\
  \spacing
  % document of basic document
  \quad Return the characteristic polynomial of \param{self}. \\
  \spacing
  % add document
  \quad \negok \param{self} is a solution of the characteristic polynomial.\\
  \spacing
  % input, output document
  \quad The output is a list of integers. \\
%
  \subsubsection{getRing -- the field}\linkedtwo{algfield}{BasicAlgNumber}{getRing}
  \func{getRing}{\param{self}}{\out{NumberField}}\\
  \spacing
  % document of basic document
  \quad Return the field which \param{self} belongs to. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
  \subsubsection{trace -- trace}\linkedtwo{algfield}{BasicAlgNumber}{trace}
  \func{trace}{\param{self}}{\out{Rational}}\\
  \spacing
  % document of basic document
  \quad Return the trace of \param{self} in the \param{self}.\linkingtwo{algfield}{BasicAlgNumber}{field} over the rational field. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
  \subsubsection{norm -- norm}\linkedtwo{algfield}{BasicAlgNumber}{norm}
  \func{norm}{\param{self}}{\out{Rational}}\\
  \spacing
  % document of basic document
  \quad Return the norm of \param{self} in the \param{self}.\linkingtwo{algfield}{BasicAlgNumber}{field} over the rational field. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
  \subsubsection{isAlgInteger -- check (algebraic) integer}\linkedtwo{algfield}{BasicAlgNumber}{isAlgInteger}
  \func{isAlgInteger}{\param{self}}{\out{bool}}\\
  \spacing
  % document of basic document
  \quad Check whether \param{self} is an (algebraic) integer or not. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
  \subsubsection{ch\_matrix -- obtain MatAlgNumber object}\linkedtwo{algfield}{BasicAlgNumber}{ch\_matrix}
  \func{ch\_matrix}{\param{self}}{\out{MatAlgNumber}}\\
  \spacing
  % document of basic document
  \quad Return \linkingone{algfield}{MatAlgNumber} object corresponding to \param{self}. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
\begin{ex}
>>> a = algfield.BasicAlgNumber([[1, 1], 1], [-2, 0, 1])
>>> a.inverse()
BasicAlgNumber([[-1L, 1L], 1L], [-2, 0, 1])
>>> a.getConj()
[(1.4142135623730951+0j), (-1.4142135623730951+0j)]
>>> a.getApprox()
[(2.4142135623730949+0j), (-0.41421356237309515+0j)]
>>> a.getCharPoly()
[-1, -2, 1]
>>> a.getRing()
NumberField([-2, 0, 1])
>>> a.trace(), a.norm()
2 -1
>>> a.isAlgInteger()
True
>>> a.ch_matrix()
MatAlgNumber([1, 1]+[2, 1], [-2, 0, 1])
\end{ex}%Don't indent!
\C
  \subsection{MatAlgNumber -- Algebraic Number Class by matrix representation}\linkedone{algfield}{MatAlgNumber}
  \initialize
  \func{MatAlgNumber}{
    \hiki{coefficient}{list},\
    \hiki{polynomial}{list}
  }{
    \out{MatAlgNumber}
  }\\
  \spacing
  % document of basic document
  \quad Create an algebraic number represented by a matrix. \\
  \spacing
  % added document
  \quad ``matrix representation'' means the matrix $A$ over the rational field such that $(e_1 + e_2 \theta + e_3 \theta^2 + \cdots + e_n \theta^{n-1})(1,\theta,\ldots,\theta^{n-1})^T=A(1,\theta,\ldots,\theta^{n-1})^T$, where $^t$ expresses transpose operation.\\
  \spacing
  % input, output document
  \quad $\param{coefficient} = [e_1, e_2, \ldots, e_n]$ means $e_1 + e_2 \theta + e_3 \theta^2 + \cdots + e_n \theta^{n-1}$,  where $\theta$ is a solution of the polynomial \param{polynomial}.
  Note that $\langle \theta^i \rangle$ is a (standard) basis of the field defining by \param{polynomial} over the rational field.\\
  \param{coefficient} must be a list of (not only integers) rational numbers.
  \param{polynomial} must be a list of integers. \\
  \begin{at}
    \item[coeff]\linkedtwo{algfield}{MatAlgNumber}{coeff}: The coefficients of the algebraic number for standard basis.
    \item[degree]\linkedtwo{algfield}{MatAlgNumber}{degree}: The degree of extension of the field over the rational field.
    \item[matrix]\linkedtwo{algfield}{MatAlgNumber}{matrix}: The representation matrix of the algebraic number.
    \item[polynomial]\linkedtwo{algfield}{MatAlgNumber}{polynomial}: The defining polynomial of the field.
    \item[field]\linkedtwo{algfield}{MatAlgNumber}{field}: The number field in which \param{self} is.

  \end{at}
  \begin{op}
    \verb|a + b| & Return the sum of \param{a} and \param{b}. \\
    \verb|a - b| & Return the subtraction of \param{a} and \param{b}. \\
    \verb| - a| & Return the negation of \param{a}. \\
    \verb|a * b| & Return the product of \param{a} and \param{b}. \\
    \verb|a ** k| & Return the \param{k}-th power of \param{a}. \\
    \verb|a / b| & Return the quotient of \param{a} by \param{b}. \\
  \end{op}
\begin{ex}
>>> a = algfield.MatAlgNumber([1, 2], [-2, 0, 1])
>>> b = algfield.MatAlgNumber([-2, 3], [-2, 0, 1])
>>> print a + b
MatAlgNumber([-1, 5]+[10, -1], [-2, 0, 1])
>>> print a * b
MatAlgNumber([10, -1]+[-2, 10], [-2, 0, 1])
>>> print a ** 3
MatAlgNumber([25L, 22L]+[44L, 25L], [-2, 0, 1])
>>> print a / b
MatAlgNumber([Rational(1, 1), Rational(1, 2)]+
[Rational(1, 1), Rational(1, 1)], [-2, 0, 1])
\end{ex}%Don't indent!
\C
  \method
  \subsubsection{inverse -- inverse}\linkedtwo{algfield}{MatAlgNumber}{inverse}
  \func{inverse}{\param{self}}{\out{MatAlgNumber}}\\
  \spacing
  % document of basic document
  \quad Return the inverse of \param{self}. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
  \subsubsection{getRing -- the field}\linkedtwo{algfield}{MatAlgNumber}{getRing}
  \func{getRing}{\param{self}}{\out{NumberField}}\\
  \spacing
  % document of basic document
  \quad Return the field which \param{self} belongs to. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
  \subsubsection{trace -- trace}\linkedtwo{algfield}{MatAlgNumber}{trace}
  \func{trace}{\param{self}}{\out{Rational}}\\
  \spacing
  % document of basic document
  \quad Return the trace of \param{self} in the \param{self}.\linkingtwo{algfield}{MatAlgNumber}{field} over the rational field. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
  \subsubsection{norm -- norm}\linkedtwo{algfield}{MatAlgNumber}{norm}
  \func{norm}{\param{self}}{\out{Rational}}\\
  \spacing
  % document of basic document
  \quad Return the norm of \param{self} in the \param{self}.\linkingtwo{algfield}{MatAlgNumber}{field} over the rational field. \\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
  \subsubsection{ch\_basic -- obtain BasicAlgNumber object}\linkedtwo{algfield}{BasicAlgNumber}{ch\_basic}
  \func{ch\_basic}{\param{self}}{\out{BasicAlgNumber}}\\
  \spacing
  % document of basic document
  \quad Return \linkingone{algfield}{BasicAlgNumber} object corresponding to \param{self}.\\
  %\spacing
  % add document
  %\spacing
  % input, output document
%
\begin{ex}
>>> a = algfield.MatAlgNumber([1, -1, 1], [-3, 1, 2, 1])
>>> a.inverse()
MatAlgNumber([Rational(2, 3), Rational(4, 9), Rational(1, 9)]+
[Rational(1, 3), Rational(5, 9), Rational(2, 9)]+
[Rational(2, 3), Rational(1, 9), Rational(1, 9)], [-3, 1, 2, 1])
>>> a.trace()
Rational(7, 1)
>>> a.norm()
Rational(27, 1)
>>> a.getRing()
NumberField([-3, 1, 2, 1])
>>> a.ch_basic()
BasicAlgNumber([[1, -1, 1], 1], [-3, 1, 2, 1])
\end{ex}
\C
  \subsection{changetype(function) -- obtain BasicAlgNumber object}\linkedone{algfield}{changetype}
  \func{changetype}{
    \hiki{a}{integer},\
    \hikiopt{polynomial}{list}{[0, 1]}
  }{
    \out{BasicAlgNumber}
  } \\
  \func{changetype}{
    \hiki{a}{Rational},\
    \hikiopt{polynomial}{list}{[0, 1]}
  }{
    \out{BasicAlgNumber}
  } \\
  \func{changetype}{
    \hiki{polynomial}{list}
  }{
    \out{BasicAlgNumber}
  } \\
  \spacing
  % document of basic document
%  \quad Return the value of that changed \param{a} into the element in the field defined by the polynomial \param{polynomial}. \\
  \quad Return a BasicAlgNumber object corresponding to \param{a}.
  \spacing
  % add document
  \spacing
  \quad If \param{a} is an integer or an instance of \linkingone{rational}{Rational}, the function returns \linkingone{algfield}{BasicAlgNumber} object whose field is defined by \param{polynomial}.
  If \param{a} is a list, the function returns \linkingone{algfield}{BasicAlgNumber} corresponding to a solution of \param{a}, considering \param{a} as the polynomial.\\
  \spacing
  % input, output document
  The input parameter \param{a} must be an integer, \linkingone{rational}{Rational} or a list of integers.\\
%
  \subsection{disc(function) -- discriminant}\linkedone{algfield}{disc}
  \func{disc}{\hiki{A}{list}}{\out{Rational}} \\
  \spacing
  % document of basic document
  \quad Return the discriminant of $a_i$, where $\param{A} = [a_1, a_2, \cdots, a_n]$. \\
  \spacing
  % add document
  % \spacing
  % input, output document
  $a_i$ must be an instance of \linkingone{algfield}{BasicAlgNumber} or \linkingone{algfield}{MatAlgNumber} defined over a same number field.\\
%
  \subsection{fppoly(function) -- polynomial over finite prime field}\linkedone{algfield}{fppoly}
  \func{fppoly}{\hiki{coeffs}{list},\ \hiki{p}{integer}}{\out{\linkingone{poly.uniutil}{FinitePrimeFieldPolynomial}}} \\
  \spacing
  % document of basic document
  \quad Return the polynomial whose coefficients \param{coeffs} are defined over the prime field $\mathbb{Z}_\param{p}$. \\
  \spacing
  % add document
  % \spacing
  % input, output document
  \quad \param{coeffs} should be a list of integers or of instances of \linkingone{finitefield}{FinitePrimeFieldElement}.\\
%
%  \subsection{prime\_decomp}\linkedone{algfield}{prime\_decomp}
%  \func{prime\_decpomp}{\hiki{p}{integer}, \, \hiki{f}{list}}{\out{BasicAlgNumber}} \\
%  \spacing
  % document of basic document
%  \quad Return prime decomposition of $(\param{p})$ over $\mathbb{Q}[x]/ (\param{f})$ . \\
%  \spacing
  % add document
  % \spacing
  % input, output document
%  \quad If output is $((\alpha, \beta), (\alpha, \gamma))$, this means $\param{p} = (\alpha, \beta)(\alpha, \gamma)$. \\
%
  \subsection{qpoly(function) -- polynomial over rational field}\linkedone{algfield}{qpoly}
  \func{qpoly}{\hiki{coeffs}{list}}{\out{\linkingone{poly.uniutil}{FieldPolynomial}}} \\
  \spacing
  % document of basic document
  \quad Return the polynomial whose coefficients \param{coeffs} are defined over the rational field. \\
  \spacing
  % add document
  % \spacing
  % input, output document
  \quad \param{coeffs} must be a list of integers or instances of \linkingone{rational}{Rational}.\\
%
  \subsection{zpoly(function) -- polynomial over integer ring}\linkedone{algfield}{zpoly}
  \func{zpoly}{\hiki{coeffs}{list}}{\out{\linkingone{poly.uniutil}{IntegerPolynomial}}} \\
  \spacing
  % document of basic document
  \quad Return the polynomial whose coefficients \param{coeffs} are defined over the (rational) integer ring.  \\
  \spacing
  % add document
  % \spacing
  % input, output document
  \quad \param{coeffs} must be a list of integers.\\
%
\begin{ex}
>>> a = algfield.changetype(3, [-2, 0, 1])
>>> b = algfield.BasicAlgNumber([[1, 2], 1], [-2, 0, 1])
>>> A = [a, b]
>>> algfield.disc(A)
288L
\end{ex}%Don't indent!(indent causes an error.)
%>>> algfield.prime_decomp(5, [-3, 1, 2, 1])
%[((BasicAlgNumber([[5, 0, 0], 1], [-3, 1, 2, 1]),
%BasicAlgNumber([[3L, 1L, 0], 1], [-3, 1, 2, 1])), 1),
%((BasicAlgNumber([[5, 0, 0], 1], [-3, 1, 2, 1]),
%BasicAlgNumber([[2L, 1L, 0], 1], [-3, 1, 2, 1])), 2)]
\C

%---------- end document ---------- %

\input{../footer}


\chapter*{Parameter Minimization using the Nelder-Mead algorithm}
\setcounter{chapter}{1}
\emph{Do some fitting}
\section{Introduction}
The Nelder-Mead plugin is used to fit an SBML model's parameters to experimental data.

The plugin has numerous properties to allow the user full control over the internal fitting engine, as well as
access to generated fitted data after a minimization session. In addition, various statistical properties, such as standardized residuals, Q-Q data, ChiSquare and reduced ChiSquare are made accessible to the user. The resulting parameter values also come with estimated confidence limits.

The current implementation is based on the Nelder-Mead C implementation by Michael F. Hutt\footnote{

 An implementation of the Nelder-Mead simplex method.
 Copyright (c) 1997-2011 Michael F. Hutt
}.

Plugin properties are documented in the next section.

\begin{landscape}
\section{Plugin Properties}
Available properties in the Nelder-Mead plugin are listed in the table below.

%\begin{table}[ht]
\centering % used for centering table
\begin{longtable}{p{4cm} l p{3cm}  p{10cm}} % centered columns

Property Name & Data Type & Default Value  & Description \\ [0.5ex] % inserts table
%heading
\hline % inserts single horizontal line
SBML                            &   string              & N/A    &   SBML document as a string. Model to be used in the fitting. \\
ExperimentalData   				&	telluriumData 		& N/A    &   Input data.  \\
FittedData      				& 	telluriumData    	& N/A    &   Output data. \\
InputParameterList 				&	listOfProperties    & N/A    &   Parameters to fit. \\
OutputParameterList 			&   listOfProperties 	& N/A    &   List of fitted parameters. \\
Experimental\-DataSelectionList & 	stringList			& N/A    &   Species selection list for experimental data. \\
FittedDataSelectionList     	& 	stringList			& N/A    &   Selection list for model data. \\
Norm							&	double				& N/A    &   Norm of fitting. An estimate of goodness of fit. \\
Norms							&	telluriumData		& N/A    &   The norm is calculated throughout a fitting session. Each Norm value is stored in the 	\verb|Norms| (read-only) property. \\

ConfidenceLimits				&	listOfProperties	& N/A    &   Confidence limits for each fitted parameter. The confidence limits are calculated at a 95\% confidence level. \\

Hessian							&	matrix				& N/A    &   Hessian matrix. The Hessian is calculated using approximation at a found parameter minimum. \\
CovarianceMatrix				&	matrix				& N/A    &   Covariance matrix. Calculated as the inverse of the Hessian.\\
Residuals     					& 	telluriumData    	& N/A    &   Residuals data.  \\
StandardizedResiduals			&	telluriumData		& N/A    &   Standardized Residuals.\\
NormalProb\-abilityOfResiduals	&	telluriumData		& N/A    &   Normal Probability of Residuals.\\
ChiSquare						&	double				& N/A    &   The ChiSquare at the minimum.\\
ReducedChiSquare				&	double				& N/A    &   The Reduced ChiSquare at the minimum.\\
StatusMessage					&	string				& N/A    &   Message from the internal fitting engine, communicating the status of the obtained fit (Currently not used).\\
NrOfIter                        &   int                 & N/A    &   Number of (internal outer loop) iterations. \\
NrOfFuncIter                    &   int                 & N/A    &   Number of objective function iterations. \\
\\[2pt]
\multicolumn{4}{p{19cm}}{The following properties are used internally by the fitting engine. They are pre-set with default values. Depending on the minimization problem at hand, they may need to be tweaked. } \\[12pt]
\hline %inserts single line
\\[2pt]
Epsilon                         &   double              & 1.e-6          		&   Convergence tolerance. \\
Scale                           &   double              & 1			            &   Scaling of vertices. \\
MaxNrOfIterations               &   int		            & 1000          		&   Maximum number of iterations. \\
Alpha                         	&   double              & 1.          			&   Reflection coefficient. \\
Beta                       		&   double              & 0.5                 	&   Contraction coefficient. \\
Gamma                        	&   double              & 1                   	&   Expansion coefficient. \\

\hline %inserts single line
\caption{Plugin Properties}
\label{table:nmPluginProperties}
\end{longtable}
%\end{table}

\end{landscape}

\section{Plugin Events}
The Nelder-Mead plugin uses all of the available plugin events, i.e. the \emph{PluginStarted}, \emph{PluginProgress} and the \emph{PluginFinished} events.

The available data variables for each event are internally treated as \emph{pass through} variables, so any data, for any of the events, assigned prior to
the plugin's execute function (in the assignOn() family of functions), can be retrieved unmodified in the corresponding event function.

\begin{table}[ht]
\centering % used for centering table
\begin{tabular}{l l p{9cm}}

Event & Arguments & Purpose and argument types \\ [0.5ex] % inserts table
%heading
\hline % inserts single horizontal line
PluginStarted  	& 	void*, void*  & Signal to application that the plugin has started. Both parameters are \emph{pass through} parameters and are unused internally by the plugin.\\[0.5ex]
PluginProgress	& 	void*, void*  & Communicating progress of fitting. Both parameters are \emph{pass through} parameters and are unused internally by the plugin. \\[0.5ex]
PluginFinished	& 	void*, void*  & Signals to application that execution of the plugin has finished. Both parameters are \emph{pass through} parameters and are unused internally by the plugin.\\

\hline %inserts single line
\end{tabular}
\caption{Plugin Events}
\label{table:nmPluginEvents}
\end{table}

\section{Python example}
The following Python script illustrates how the plugin can be used.

\begin{singlespace}
\lstinputlisting[label=NelderMeadExample,caption={Minimization example.},language=Python]{Examples/telNelderMead.py}
\end{singlespace}

\begin{figure}[ht]
\centering
\includegraphics[width=\textwidth]{NelderMeadOutput.png}
\caption{Typical output for the example script above.}
\label{fig:nmFig}
\end{figure}


\documentclass[notes]{beamer}          % print frame + notes
%\documentclass[notes=only]{beamer}     % only notes
%\documentclass{beamer}                 % only frames

\usecolortheme{beaver}

% Some commonly used packages
% (copied mainly from the Utrecht University theme: https://www.overleaf.com/project/5c900fa3bd9930036341116a)
\usepackage{ragged2e}  % `\justifying` text
\usepackage{booktabs}  % Tables
\usepackage{tabularx}
\usepackage{tikz}      % Diagrams
\usetikzlibrary{calc, shapes, backgrounds}
\usepackage{amsmath, amssymb, amsfonts, amsthm}
\usepackage{url}       % `\url`s
\usepackage{listings}  % Code listings
\usepackage{comment}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{amsmath}

% Mainly math commands
\newcommand{\vect}[1]{\bm{#1}}
\usepackage{amsfonts}% to get the \mathbb alphabet
\newcommand{\field}[1]{\mathbb{#1}}
\newcommand{\C}{\field{C}}
\newcommand{\R}{\field{R}}
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\argmin}{\operatornamewithlimits{argmin}}
\providecommand{\abs}[1]{\lvert#1\rvert}
\providecommand{\norm}[1]{\lVert#1\rVert}

% A variable used to exclude slides from the lecture version
\newif\iffull
%\fullfalse
\fulltrue

% Bibliography
\usepackage[uniquename=init,giveninits=true,maxcitenames=1,style=authortitle-comp,backend=bibtex8]{biblatex}
%\bibliography{references}
\addbibresource{references.bib}

%Information to be included in the title page:
\title{Unsupervised learning}
\author{Federica Eduati}
\institute{Eindhoven University of Technology

Department of Biomedical Engineering}
\date{2021}

\begin{document}

\frame{\titlepage}

\section{Overview}

\begin{frame}
\frametitle{Learning goals}
At the end of this lecture you will:
\begin{itemize}
    \item Have a general understanding of what is unsupervised learning.
    \item Have a general understanding what is dimensionality reductions and some methods to do it.
    \item Have a general understanding of what is clustering and some methods to do it.
\end{itemize}

\vspace{5mm}

Materials:
\begin{itemize}
    \item Chapters 14 from \cite{elements}.
\end{itemize}

\end{frame}

\begin{frame}{Mentimeter}
Go to www.menti.com and use the code 26 68 29 06
\end{frame}

\begin{frame}
\frametitle{Overview}
Topics of the lecture:
\begin{itemize}
    \item What is unsupervised learning?
    \item Methods for dimensionality reduction
    \begin{itemize}
    		\item Principal components analysis
    		\item t-SNE
    \end{itemize}
    \item Methods for clustering
    \begin{itemize}
    		\item K-means clustering
    		\item Hierarchical clustering
    	\end{itemize}
\end{itemize}

\vspace{5mm}

\end{frame}

\section{Overview}

\section{General introduction}
\begin{frame}{Difference between supervised and unsupervised learning}
With both supervised and unsupervised learning we have a set of features $X_1, X_2, \dots, X_p$.

\vspace{5mm}

\begin{itemize}
\item with \textbf{supervised learning} (or \textit{learning with a teacher}) we also have a variable $Y$ (a label).
\item with \textbf{unsupervised learning} (or \textit{learning without a teacher}) we don't have the label.
\end{itemize}

\end{frame}

\begin{frame}{Unsupervised learning}
The goal of \textbf{unsupervised learning} is to find similarities among observations based on the set of features.

\vspace{2mm}

Two categories:
\begin{itemize}
   \item \textbf{Dimensionality reduction}: reduce the the dimensions of the input features to facilitate visualisation and identification of groups. Also used as preprocessing before applying supervised techniques.
   \item \textbf{Clustering}: techniques to discover unknown groups (clusters) in data.
\end{itemize}

\vspace{2mm}

Compared to supervised learning:
\begin{itemize}
\item No need for labels (often difficult to retrieve)
\item No quantitative metrics to measure success; evaluation based on heuristic arguments.
\end{itemize}

\end{frame}

\begin{frame}{Principal Component Analysis (PCA)}
Idea: From the $p$ variables (often correlated), derive a smaller subset of variables that explain most of the variability of the original set.
\vspace{2mm}
\begin{center}
\includegraphics[height=4.2cm]{../figures/week_7/PrincipalComponetDrawing.pdf}
\end{center}
\end{frame}

\begin{frame}{Principal Component Analysis (PCA)}
Starting from a set of features $X_1, X_2, \dots, X_p$, the \textit{first principal component} is the normalised linear combination of the features.

\begin{equation*}
	Z_1 =v_{11}X_1 + v_{21}X_2 + \dots + v_{p1}X_p
\end{equation*}

where $\sum_{j=1}^{p}v_{j1}^2=1$, and $v_{11}, v_{21}, \dots, v_{p1}$ are the \textit{loadings} of the first principal component and $v_1=(v_{11}, v_{21}, \dots, v_{p1}$) is the \textit{first principal component loading vector}.
\end{frame}

\begin{frame}{PCA computation - first principal component (PC1)}
We have our N observations $x_1, x_2,  \dots, x_N$, where each $x_i= (x_{i1}, x_{i2}, \dots, x_{ip})^T$, or in matrix form $\mathbf X$ of size $N \times p$.

\vspace{2mm}

Since we are interested only in the variance we assume that each feature has 0 mean, i.e. $\mathbf X$  has columns with mean zero.

\vspace{2mm}

We want to find the linear combination of the sample feature value:

\begin{equation*}
	z_{i1} =v_{11}x_{i1} + v_{21}x_{i2} + \dots + v_{p1}x_{ip}
\end{equation*}

with the largest sample variance, i.e.

\begin{equation*}
\max_{v_{11}, \dots, v_{p1}}  \{\frac{1}{N} \sum_{i=1}^N (\sum_{j=1}^p v_{j1}x_{ij})^2\} \text{     subject to   } \sum_{j=1}^{p}v_{j1}^2=1
\end{equation*}

Since each $x_{ij}$ has mean zero, also does $z_{ij}$. Hence we are maximising the sample variance of $Z_{1}$ which is $\frac{1}{N}\sum_{i=1}^N z_{i1}^2$.

\end{frame}

\begin{frame}{PCA computation - PC1 geometrical interpretation}
\begin{itemize}
\item The loading vector $v_1$ with elements $v_{11}, v_{21}, \dots, v_{p1}$ define the direction along which the data vary the most.
\item The projections of the N points $x_1, x_2, \dots, x_N$ onto this direction are the principal component scores $z_{11}, z_{21}, \dots, z_{N1}$.
\end{itemize}

\begin{center}
\includegraphics[height=5cm]{../figures/week_7/PCA_geometrical.pdf}
\end{center}
\end{frame}

\begin{frame}{PCA computation - further principal components}
Now that we have the fist principal component $Z_1$ we want to find the \textit{second principal component}. $Z_2$.

\vspace{2mm}

$Z_2$ needs to be uncorrelated with $Z_1$. This is equivalent to constrain the direction of the loading vector $v_2$  is orthogonal to the direction of $v_1$.

\vspace{2mm}

 Same for the following principal components.

 \begin{center}
\includegraphics[height=4.2cm]{../figures/week_7/PCA_geometrical_part2.pdf}
\end{center}

\end{frame}

\begin{frame}{Mentimeter question (www.menti.com code 26 68 29 06)}
When do you expect is PCA to have poor performance in feature reduction?
\begin{itemize}
\item When the features are highly correlated
\item When the features are uncorrelated
\item When the features are dominated by noise
\end{itemize}
\end{frame}

\begin{frame}{PCA computation using SVD}
This optimisation problem can be solved via \textit{singular value decomposition} of the matrix $\mathbf X$:

\begin{equation*}
\mathbf X = \mathbf{UDV}^T
\end{equation*}
which is a unique decomposition such that (for $N \ge p$):

\begin{itemize}
\item $\mathbf{U}$ is a $N \times p$ orthogonal matrix ($\mathbf{U}^T\mathbf{U}=\mathbf{I}_p$)
\item $\mathbf{D}$ is a $p \times p$ diagonal matrix with $d_i \ge 0$ and $d_{i} \ge d_{i+1}$ known as the \textit{singular value}
\item $\mathbf{V}$ is a $p \times p$ orthogonal matrix ($\mathbf{V}^T\mathbf{V}=\mathbf{I}_p$)

\end{itemize}

The columns of $\mathbf{UD}$ are the \textit{principal components} of $\mathbf{X}$ ($PC1=u_{i1}d_1, PC2=u_{i2}d_2, \dots)$ and $\frac{d_{1}^2}{N}, \frac{d_{2}^2}{N}, \dots$ is the variance explained by each principal component.
\end{frame}

\begin{frame}{PCA example using images}
\begin{center}
\includegraphics[height=6.2cm]{../figures/week_7/pca_image_example.png}
\end{center}
\end{frame}

\begin{frame}{PCA example using GDSC dataset}
RNA expression data (244 genes) for 148 cell lines from four cancer types. Samples are \textit{a posteriori}  coloured by cancer type.
\begin{figure}
\minipage{0.45\textwidth}
  \includegraphics[width=\linewidth]{../figures/week_7/GDSC_2D_PC.pdf}
\endminipage\hfill
\minipage{0.55\textwidth}
  \includegraphics[width=\linewidth]{../figures/week_7/GDSC_3D_PC.pdf}
\endminipage\hfill
\end{figure}
\end{frame}

\begin{frame}{PCA example using GDSC dataset - loads}
Loads of the first 3 principal components (only top 50 genes)
\begin{center}
\includegraphics[height=7cm]{../figures/week_7/GDSC_loadsPC123.pdf}
\end{center}
\end{frame}

\begin{frame}{PCA example using GDSC dataset - variance explained}
Variance explained by the principal components.
\begin{figure}
\minipage{0.50\textwidth}
  \includegraphics[width=\linewidth]{../figures/week_7/GDSC_PCA_variance.pdf}
\endminipage\hfill
\minipage{0.50\textwidth}
  \includegraphics[width=\linewidth]{../figures/week_7/GDSC_PCA_cumul_variance.pdf}
\endminipage\hfill
\end{figure}

Elbow in the "proportion of variance explained" plot can be used as a criteria to decide how many principal components to use.
\end{frame}

\begin{frame}{t-SNE}
\begin{itemize}
	\item PCA is a linear algorithm, i.e. principal components are linear combinations of the features.
	\item t-Distributed Stochastic Neighbor Embedding (t-SNE) is a non-linear techinque for dimensionality reduction.
	\item t-SNE works very well in high dimensional data.
	\item Cons: it is computationally demanding, it is stochastic and it is governed by hyperparameters.
\end{itemize}

\end{frame}

\begin{frame}{t-SNE computation}
\begin{itemize}
	\item Computes a measure of pairwise similarity in the original (multi-dimentional) feature space;
	\item Tries to minimise the difference between the similarity in the high-dimensional space and the similarity in a lower-dimensional space (typically 2 or 3 dimensions);
	\item The measure of similarity in the high- and low- dimensional space is different and this allows to visualise the clusters as more homogeneous.

\end{itemize}
\end{frame}

\begin{frame}{t-SNE example using GDSC data}
\begin{center}
\includegraphics[height=6.2cm]{../figures/week_7/GDSC_tSNE.pdf}
\end{center}
\end{frame}

\begin{frame}{Clustering}
\begin{itemize}

\item Aim: Group observations into subsets or \textit{clusters} or \textit{segments} so that observations within a cluster are more similar to each other than observations assigned to different cluster.
\item Requires a definition of \textit{similarity} or \textit{difference}.
\item This is similar to the definition of the cost function for supervised learning, the most appropriate definition of \textit{similarity} or \textit{difference} depend on the type of data.

\end{itemize}

\end{frame}

\begin{frame}{K-means clustering}
\begin{itemize}

\item Assign each observation $i \in \{1, 2, \dots, N \}$ to one cluster $k \in \{1, 2, \dots, K \}$.
\item $K$ need to be predefined, and $K < N$
\item This assignment correspond to a many-to-one mapping $k = C(i)$, which is an \textit{encoder} that assigns the $i$th observation to the $k$th cluster.
\item Each observation is assigned to one and only one cluster.

\end{itemize}

\end{frame}

\begin{frame}{K-means clustering}
We want to define the clusters so that similar points are in the same cluster and dissimilar points are in different clusters.

Defining $d_{i, i^\prime}=d(x_i, x_{i^\prime})$ as a measure of dissimilarity between a pair of observations $x_i$ and $x_{i^\prime}$, the total point scatter T is :

\begin{equation*}
	T = \frac{1}{2}  \sum_{i=1}^N \sum_{i^\prime=1}^N d_{i, i^\prime} = \frac{1}{2}  \sum_{k=1}^K \sum_{C(i)=k} (\sum_{C(i^\prime)=k} d_{i, i^\prime}  + \sum_{C(i^\prime) \neq k} d_{i, i^\prime})
\end{equation*}

Where:
\begin{itemize}
 \item $W(C) = \frac{1}{2} \sum_{k=1}^K \sum_{C(i)=k} \sum_{C(i^\prime)=k} d_{i, i^\prime}$ is the \textit{within-cluster} point scatter that we want to minimise
 \item $B(C) = \frac{1}{2} \sum_{k=1}^K \sum_{C(i)=k} \sum_{C(i^\prime) \neq k} d_{i, i^\prime}$ is the \textit{between-cluster} point scatter that we want to maximise
\end{itemize}

Minimising $W(C)$ or maximising $B(C)$ is equivalent.
\end{frame}

\begin{frame}{K-means clustering}
With K-means all variables has to be quantitative and we use the Eucledian distance as a measure of similarity:
\begin{equation*}
	d(x_i, x_{i^\prime}) = \sum_{j=1}^p (x_{ij} - x_{i^\prime j})^2 = \norm{x_{i} - x_{i^\prime} }^2
\end{equation*}

The within-point scatter can be written as:

\begin{equation*}
	W(C) = \frac{1}{2} \sum_{k=1}^K \sum_{C(i)=k} \sum_{C(i^\prime)=k} \norm{x_{i} - x_{i^\prime} }^2 = \sum_{k=1}^K N_k \sum_{C(i)=k}  \norm{x_{i} - \bar{x}_k }^2
\end{equation*}

where $N_k$ is the number of points in the $k$th cluster and $\bar{x}_k = (\bar{x}_{1k}, \dots, \bar{x}_{pk})$ is the mean vector associated with the $k$th cluster
\end{frame}

\begin{frame}{K-means clustering algorithm}
For high number of points $N$ it is infeasible to test all possible clustering assignments.

\vspace{2mm}

We need \textit{iterative greedy descent} strategies to iteratively improve clustering assignments:

\begin{enumerate}
 \item Randomly assign each observation to one cluster.
 \item Iterate the next two steps until cluster assignment stops changing
 \begin{enumerate}
 	\item For each cluster compute the mean vector $x_k$ (i.e. \textit{centroid})
 	\item Assign each observation to the cluster whose centroid is closest (based on Eucledian distance).
 \end{enumerate}
\end{enumerate}

\end{frame}

\begin{frame}{K-means iterations}
\begin{center}
\includegraphics[height=7cm]{../figures/week_7/K-means_iterations.pdf}
\end{center}
\end{frame}

\begin{frame}{Mentimeter question (www.menti.com code 26 68 29 06)}
What do you expect to happen if you apply K-means to this case?
\begin{itemize}
\item It will correctly identify the two classes
\item It depends on the initialisation
\item It will not be able to correctly identify the two classes
\end{itemize}
\begin{center}
\includegraphics[height=4cm]{../figures/week_7/nonseparableclass.png}
\end{center}
\end{frame}

\begin{frame}{K-means problems and solutions}
\begin{itemize}
 \item Problem: Does not guarantee the global minimum. Solution: we can check that no single switch of an observation to a different group decreases the objective function.
 \item Problem: Different random initialisation can provide different solutions. Solution: We can run it multiple times and select the solution with minimum objective function.
 \item We need to define the number of clusters.
\end{itemize}
\end{frame}

\begin{frame}{K-means example using GDSC data}

Compute K-means for different number of clusters and look at total within-cluster sum of squares for each clustering.
\begin{center}
\includegraphics[height=5cm]{../figures/week_7/Kmeans_differentclustersize.pdf}
\end{center}
Look at the elbow to define optimal number of cluster (not always possible).
\end{frame}

\begin{frame}{K-means example using GDSC data}
Number of cases of each cancer type (columns) in each cluster (rows), when using $K=4$.
\begin{center}
\begin{tabular}{ c | | c | c | c | c }
& breast & colorectal & kidney & neuroblastoma \\
\hline \hline
1 & 6 & 0 & 28 & 1 \\
2 & 41 & 7 & 0 & 0\\
3 & 0 & 37 & 0 & 0\\
4 & 0 & 1 & 0 & 27\\
\end{tabular}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering}
\begin{itemize}
\item Differently from K-means, \textit{hierarchical clustering} does not require to specify a number of clusters.
\item It organises observations in a hierarchy, where clusters at each level of the hierarchy are created merging clusters at the next lower level.
\item The approach that we will see is \textit{bottom-up}
\begin{enumerate}
 \item It starts from the lowest level, where each observation is a singleton cluster.
 \item For $N-1$ steps it merges a selected pairs if clusters (i.e. the most similar) in a single cluster.
\end{enumerate}
\item This process can be visualized as a \textit{dendogram}
\end{itemize}
\end{frame}

\begin{frame}{Mentimeter question (www.menti.com code 26 68 29 06)}
How many clusters do we have after $N-1$ steps?
\end{frame}

\begin{frame}{Hierarchical clustering - Bottom-up approach }
\begin{center}
\includegraphics[height=5cm]{../figures/week_7/HierarchicalClustering_1.png}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering - Bottom-up approach - step 1}
\begin{center}
\includegraphics[height=5cm]{../figures/week_7/HierarchicalClustering_2.png}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering - Bottom-up approach - step 2}
\begin{center}
\includegraphics[height=5cm]{../figures/week_7/HierarchicalClustering_3.png}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering - Bottom-up approach - step 3}
\begin{center}
\includegraphics[height=5cm]{../figures/week_7/HierarchicalClustering_4.png}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering - Bottom-up approach - step 4}
\begin{center}
\includegraphics[height=5cm]{../figures/week_7/HierarchicalClustering_5.png}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering - Linkage}
How do we measure dissimilarity between two clusters (i.e. groups of observations)?
Consider two clusters $G$ and $H$, most used approaches are:
\begin{itemize}
\item \textit{Single linkage}
\begin{equation*}
	d_{SL}(G, H) = \min_{i \in G, i^\prime \in H} d_{ii^\prime}
\end{equation*}
\item \textit{Complete linkage}
\begin{equation*}
	d_{CL}(G, H) = \max_{i \in G, i^\prime \in H} d_{ii^\prime}
\end{equation*}
\item \textit{Average linkage}
\begin{equation*}
	d_{CL}(G, H) = \frac{1}{N_G N_H} \sum_{i \in G} \sum_{i^\prime \in H}  d_{ii^\prime}
\end{equation*}
\end{itemize}
\end{frame}

\begin{frame}{Hierarchical clustering - Dissimilarity measure}
How do we measure dissimilarity between two points?
\begin{itemize}
\item  Most commonly used is Euclidean distance.
\item Another used metric is correlation (of observations across features).
\end{itemize}
\end{frame}

\begin{frame}{Mentimeter question (www.menti.com code 26 68 29 06)}
What is the best measure of dissimilarity when observations are time series similar to the ones in the plot?
\begin{itemize}
\item Euclidean distance
\item Correlation
\end{itemize}
\begin{center}
\includegraphics[height=5cm]{../figures/week_7/question_metric_hierarchical_clustering.pdf}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering - How to interpret a dendogram}
\begin{itemize}
\item Branches' height is proportional to the similarity between nodes.
\begin{itemize}
\item Observations that fuse at the bottom of the dendogram are similar to each other.
\item Observations that fuse at the top of the dendogram are different from each other.
\end{itemize}
\item We can cut the dendogram at a certain hight to obtain clusters.
\end{itemize}
\end{frame}

\begin{frame}{Hierarchical clustering - How to obtain clusters}
\begin{center}
\includegraphics[height=5cm]{../figures/week_7/HierarchicalClustering_clusters_1.png}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering - How to obtain clusters}
\begin{center}
\includegraphics[height=5cm]{../figures/week_7/HierarchicalClustering_clusters_2.png}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering - How to obtain clusters}
\begin{center}
\includegraphics[height=5cm]{../figures/week_7/HierarchicalClustering_clusters_3.png}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering - How to obtain clusters}
\begin{center}
\includegraphics[height=5cm]{../figures/week_7/HierarchicalClustering_clusters_4.png}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering - How to obtain clusters}
\begin{center}
\includegraphics[height=5cm]{../figures/week_7/HierarchicalClustering_clusters_5.png}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering - examples with GDSC data}
Clustering using complete linkage for cluster similarity and Eucledian distance as observations similarity metric.
\begin{center}
\includegraphics[height=6.2cm]{../figures/week_7/GDSC_heatmap_complete.pdf}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering - examples with GDSC data}
Clustering using single linkage for cluster similarity and Eucledian distance as observations similarity metric.\begin{center}
\includegraphics[height=6.2cm]{../figures/week_7/GDSC_heatmap_single.pdf}
\end{center}
\end{frame}

\begin{frame}{Hierarchical clustering - examples with GDSC data}
Clustering using complete linkage for cluster similarity and correlation as observations similarity metric.
\begin{center}
\includegraphics[height=6.2cm]{../figures/week_7/GDSC_heatmap_correlation.pdf}
\end{center}
\end{frame}

\begin{frame}{Conclusions}
\begin{itemize}
\item Unsupervised learning is useful to find inherent patterns in data.
\item It does not use/require labels on data.
\item No gold standard to assess performances.
\item Used a lot for data exploration and/or as first step to then apply supervised learning.
\item Active field of research, essential to explore increasingly available high-dimensional data.
\end{itemize}
\end{frame}

\begin{frame}{References}
\begin{itemize}
\item The figures showing geometrical interpretation of PCA and iterations of K-means are taken from "An Introduction to Statistical Learning, with applications in R"  (Springer, 2013) with permission from the authors: G. James, D. Witten, T. Hastie and R. Tibshirani
\end{itemize}
\printbibliography
\end{frame}
\end{document}