text:
\documentclass[conference,a4paper]{IEEEtran}

% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}

\usepackage{float}
\usepackage[utf8]{inputenc}
\usepackage{url}
\usepackage{array}
\usepackage{cite}
\usepackage{microtype}
\usepackage{graphicx}

\graphicspath{ {images/} }

% Centered columns
\newcolumntype{V}{>{\bf\centering\arraybackslash} m{.2\linewidth} }

% Default fixed font does not support bold face
\DeclareFixedFont{\ttb}{T1}{txtt}{bx}{n}{12} % for bold
\DeclareFixedFont{\ttm}{T1}{txtt}{m}{n}{12}  % for normal

% Custom colors
\usepackage{color}
\definecolor{deepblue}{rgb}{0,0,0.5}
\definecolor{deepred}{rgb}{0.6,0,0}
\definecolor{deepgreen}{rgb}{0,0.5,0}

\usepackage{listings}

% Python style for highlighting
\newcommand\pythonstyle{\lstset{
language=Python,
basicstyle=\ttm,
otherkeywords={self},
keywordstyle=\ttb\color{deepblue},
emphstyle=\ttb\color{deepred},
stringstyle=\color{deepgreen},
frame=tb,
showstringspaces=false
}}

% Python environment
\lstnewenvironment{python}[1][]
{
\pythonstyle
\lstset{#1}
}
{}

% Define JSON language
\lstdefinelanguage{json}
{
morestring=[b]" % defines that strings are enclosed in double quotes
}

% JSON style for highlighting
\newcommand\jsonstyle{\lstset{
language=json,
basicstyle=\ttm,
stringstyle=\color{deepgreen},
frame=tb,
showstringspaces=false
}}

% JSON environment
\lstnewenvironment{json}[1][]
{
\jsonstyle
\lstset{#1}
}
{}

\begin{document}

\title{fl0w - a development environment for the\\ KIPR Wallaby}
\author{\IEEEauthorblockN{Philip Trauner, Christoph Heiss, Sebastian Schaffler, Nico Kratky, Nico Leidenfrost, Christine Zeh, Sascha Zemann}
\IEEEauthorblockA{Department for Computer Science\\
Secondary Technical College\\
Wiener Neustadt, Austria\\
Email: philip.trauner@arztpraxis.io, me@christoph-heiss.me, se.schaffler@gmail.com, \\nico@nicokratky.me, leidenfrost.nico@gmail.com, zeh.chrisi@gmail.com, sascha.zemann@gmail.com}
}
\maketitle

\begin{abstract}
This publication introduces fl0w, an alternative development environment and monitoring solution for the KIPR Wallaby. The aim of fl0w is to improve the Botball program development experience. It focuses on the components that make up fl0w, namely a file synchronization protocol that maintains a consistent state across all connected controllers, a route based and data type preserving network protocol with peer-to-peer piping capabilities, a discovery protocol that connects all controllers together automatically, a Sublime Text 3 plugin which enables in-line sensor readouts, program execution, program editing, and keyboard shortcuts, and a browser-based management front-end to manage the controller fleet.\\
\end{abstract}

\begin{IEEEkeywords}
file synchronization, networking, LAN discovery, development environment, monitoring
\end{IEEEkeywords}

\section{Introduction}
fl0w\cite{fl0w:Philip Trauner} was developed out of the need for a fast, reliable and wireless workflow solution that can compete with the currently available offerings like Harrogate\cite{Harrogate:KIPR}. Its goals are to transform the connected controllers into a redundant fleet of logical units that share the same binaries and source code, real-time in-line sensor readouts, programming as well as robot management inside Sublime Text 3\cite{Sublime Text 3:Sublime HQ}, and a browser-based front-end.

\section{Implementation}
fl0w is the combination of all its components split into Wallaby\cite{Wallaby Controller:KIPR} client and server. All components emphasize shared code and are therefor written in Python\cite{Python:Python Foundation} 3.3.6 to remain compatible with the Sublime Text 3 plugin environment. \\Python was chosen as the implementation language for fl0w because of its rich standard library and its lightweight virtual machine that can run on a Wallaby controller with acceptable speed. A pre-compiled version of Python is bundled with the fl0w installer, r0adrunner, because it is not present on the Wallaby by default. \\All fl0w components are designed as libraries to allow for integration into other projects. fl0w utilizes a client-server networking model with random server assignment. Client-server was chosen because the server can act as a data source for all clients and logic can be clearly separated.

\section{Components}

\subsection{undergr0und}
undergr0und\cite{undergr0und:Philip Trauner} is an asynchronous, route based, and data type preserving network protocol with peer-to-peer piping capabilities.
It automatically converts data into a transferable format and prepends binary headers to allow for reconstruction on the other end.

\begin{table}[H]
\caption{The binary encoding of messages in undergr0und (in bytes)}
\centering
	\begin{tabular}{*{3}{V}}
		Data type & Route ID & Data \\ \hline
		1 & 2 & * \\
	\end{tabular}
\label{fig:undergr0und_header}
\end{table}

The Python version is built on top of a fork of ws4py\cite{ws4py:Philip Trauner} and the JavaScript\cite{ECMAScript:Ecma} version utilizes regular WebSockets\cite{The WebSocket Protocol:A. Melnikov} in arraybuffer mode. It was created because the requirements for fl0ws network protocol specification changed constantly and a dynamic approach to networking was required. Instead of one monolithic network protocol, undergr0und emphasizes small sub protocols. undergr0und manages itself through its own concepts by transmitting the initial handshake and metadata on a route.\\

\subsubsection{undergr0und.js}
undergr0und.js\cite{undergr0und.js:Philip Trauner} is the feature complete client-side JavaScript port of undergr0und that was required for dashb0ard\cite{dashb0ard:Sebastian Schaffler}, the browser-based front-end for fl0w. It utilizes node-jspack\cite{node-jspack:Peter Griess} to unpack the binary messages it receives from the undergr0und server. It is based on the Python version but does not implement the server because there is currently no need for that functionality. \\undergr0und.js can be used in Node.js\cite{Node.js:Node.js Foundation} as well as browsers that support WebSockets. browserify\cite{browserify:James Halliday} is used to create the browser version.\\

\subsubsection{Exchange table}
To reduce the required additional bandwidth per message that is introduced with variable character count routes, a numbered route lookup table is generated on startup by clients and the server. Before any communication takes place these lookup tables are exchanged. Route ID 0 is reserved for self management purposes.\\

\begin{figure}[H]
\centering
\begin{python}
>>> routes = {"echo": Echo(),
...    "help": Help()}
>>> create_exchange_map(routes)
{0: "meta", 1: "echo", 2: "help"}
\end{python}
\caption{Creation of exchange maps used to lower bandwidth requirements}
\end{figure}

\subsubsection{Connection constructs}
\paragraph{Route}
A client$\,\to\,$server / server$\,\to\,$client construct. Invoked with the {\color{deepgreen}"send"} call.

\paragraph{Pipe}
A client$\,\to\,$server$\,\to\,$client construct. Invoked with the {\color{deepgreen}"pipe"} call. \\Clients can be targeted with unique IDs that are generated randomly for all connected peers by the server. There is no predefined mechanism in the network protocol that exposed these peer IDs, the application using undergr0und has to provide a way of making them available. This approach allows for more flexibility if additional peer-metadata has to be provided. \\Pipe messages are packaged inside regular route messages with additional headers in the data segment. A server route called {\color{deepgreen}"pipe"} unpacks the regular and the extended headers and forwards the message to the targeted peer. The original sender ID is always included for a possible response.\\

\subsubsection{Data type preservation}
The original type of the data segment is present inside the header $($see Table ~\ref{fig:undergr0und_header}$)$ to accurately reconstruct sent data on the other end. JSON\cite{JSON:T. Bray Ed.} is used to transfer lists and dictionaries, and regular UTF-8 encoded strings are utilized to transfer integers, floats, null/none types and strings.

\subsection{behem0th}
behem0th\cite{behem0th:Christoph Heiss} is a continuous network file synchronization protocol developed out of the need for an embeddable solution that would not require an additional background program to be present on the system running Sublime Text 3, instead utilizing its plugin environment. \\It uses a client-server networking model without peer-to-peer capabilities to stay in line with undergr0und. It uses regular sockets instead of WebSockets because the in-browser components of fl0w never interacts with it. The file-system is monitored using the watchdog\cite{watchdog:Yesudeep Mangalapilly} library.\\

\subsubsection{Synchronization}
On startup, behem0th synchronizes files based on their last modification time and MD5 hash. After that, files get synchronized to other clients as soon as a file-system event happens. Synchronization conflicts are resolved on the server and it is possible to use behem0th with a theoretically indefinite amount of clients.\\

\subsubsection{Transfer}
behem0th neither sends nor receives files as a whole, instead it transmits the file as small blocks (4096 bytes), which are written to a temporary file on disk as soon as they are received. This is done to allow the transfer of large files even in very random-access-memory-constrained environments.\\

\subsubsection{Protocol}
behem0th is independent from undergr0und and defines its own network protocol. It is completely text-based, uses UTF-8 for character encoding and JSON as format encoding. behem0th is designed around 'requests' $($see Figure ~\ref{fig:behem0th_request}$)$ and 'routes'. Each request is a JSON-formatted string and separated by a newline.

\begin{figure}[H]
\centering
\begin{json}
{
    "route": "<route-name>",
    "data": "<route-specific data>"
}
\end{json}
\caption{behem0th request encoding in JSON}
\label{fig:behem0th_request}
\end{figure}

A route can also send additional data if needed (a 'payload'). For binary data, base64\cite{Base64:S. Josefsson} encoding is used. After each payload, there is a newline to delimit the payload and the next request. \\

\subsubsection{Security concerns}
Although MD5 is deprecated and known to suffer from extensive vulnerabilities, behem0th is designed to only run in a local network, which is controlled by the users of fl0w This assumption also simplifies the implementation greatly.

\subsection{dashb0ard}
dashb0ard\cite{dashb0ard:Sebastian Schaffler} is a single-page web application designed to manage the fl0w fleet.\\ It can be used to configure connected controllers and obtain sensor readouts as well as debug logs. \\It utilizes undergr0und.js to retrieve data from fl0w, Vue.js\cite{Vue:Evan You} for its user interface, Bootstrap 3\cite{Bootstrap 3:Twitter Inc.} as a design baseline, Flot\cite{Flot:David Schnur} to display graphs and jQuery\cite{jQuery:jQuery Foundation} for additional DOM manipulation.

\begin{figure}[H]
\centering
\includegraphics[scale=0.3]{dashb0ard}
\caption{The control and configuration page of dashb0ard}
\label{fig:dashb0ard_config}
\end{figure}

\begin{figure}[H]
\centering
\includegraphics[scale=0.25]{dashb0ard-sensor}
\caption{The sensor readout page of dashb0ard}
\label{fig:dashb0ard_sensor}
\end{figure}
\subsection{edit0r}
edit0r\cite{edit0r:Philip Trauner} is the Sublime Text 3 plugin. It is modeled as a fl0w client and allows for remote robot management, source code synchronization as well as in-line sensor readouts. \\It also provides quick access to dashb0ard, which is required because the IP addresses of controllers are not always static. behem0th is embedded into edit0r and enables the source code synchronization. In its current form only C programs are supported because the folder structure for Python programs in Harrogate is different.\\

\subsubsection{Robot selection}
fl0ws networking model allows for the management of multiple controllers without a direct connection to them. The controller hostname is utilized to identify the robots in the user-interface. Controllers can be selected to obtain additional functionality such as in-line sensor readouts and keyboard shortcuts.\\

\begin{figure}[H]
\centering
\includegraphics[scale=0.6]{edit0r}
\caption{edit0rs robot management interface in Sublime Text 3}
\label{fig:robot_management}
\end{figure}

\subsubsection{Robot management}
Botball programs can be started and/or stopped.
Additionally, edit0r allows for modification of the controller hostname, playback of a sound for identification purposes, listing of running processes, and power management functionality (reboot, shutdown).\\

\subsubsection{In-line sensor readouts}
Invocations of the functions "analog" and "digital", functions typically used to obtain sensor values, are located every time the content of a view changes and the parameters of the calls are grouped across views. edit0r subscribes to all required sensor ports by requesting them from the currently selected controller. The controller keeps track of all subscriptions to sensors and continuously transmits the appropriate values to the Sublime Text 3 plugin. \\Sublime Text 3 phantoms, which are in-line fields to display data within a text view, are created as soon as new sensor values are available. This approach has the disadvantage of higher than usual processor utilization by edit0r, because phantoms were primarily designed to display infrequently updating content. To partially circumvent this, sensor readouts can be disabled and are not enabled by default.\\
In-line sensor readouts can be toggled on a per view basis with a keyboard shortcut.\\

\begin{figure}[H]
\centering
\includegraphics[scale=0.7]{sensor-readouts}
\caption{edit0rs inline sensor-readouts in Sublime Text 3}
\label{fig:inline_sensor_readouts}
\end{figure}

\subsection{r0adrunner}
r0adrunner is the installer of fl0w. \\It is built to mimic a Wallaby controller software update to remain compatible with the preexisting update functionality found in Harrogate. It is implemented in Python 2.7, which is already installed on all Wallaby controllers. A full-fledged precompiled version of Python 3.6.0 is installed by r0adrunner because fl0w utilizes features of Python 3.3.6. \\It also changes the Wallaby hostname to their unique manufacturing ID because fl0w uses hostnames to represent controllers in its user facing components. r0adrunner is distributed as an archive that has to be copied to an USB storage medium.

\subsection{disc0very}
disc0very\cite{disc0very:Christoph Heiss} is the LAN discovery protocol of fl0w. It relies on UDP\cite{UDP:J. Postel} broadcasts to coordinate server and client assignment. Wallaby controller instances as well as the Sublime Text 3 plugin edit0r make use of it to determine if there is already an active fl0w server on the network upon startup without user interaction.

\subsubsection{Discovery process}
Upon launch disc0very listens for advertisements from an already running fl0w server. If an advertisement is received the client-mode is engaged and a connection to the server is established. If no advertisement has been received after 2s server-mode is engaged.

\begin{figure}[H]
\centering
\begin{json}
{
    "address": "<address>",
    "port": "<port>"
}
\end{json}
\caption{disc0very advertisement encoding in JSON}
\label{fig:discovery_advertisement}
\end{figure}

\subsubsection{Error recovery}
disc0very actively listens for advertisements in server-mode to prevent more than one running server on the network. If a server receives an advertisement from another server both shut down, wait for a random amount of time (between 1 and 5 seconds), and return to discovery mode.

\subsection{fl0w}
fl0w itself is the combination of all other components split into Wallaby client and server.\\

\subsubsection{Wallaby client}
The Wallaby\ client serves as an information source for sensor values, program output, as well as currently running processes. Additionally it exposes its own standard output for monitoring purposes.\\

\subsubsection{Server}
The server keeps track of all clients and provides means to acquire their peer IDs, which are used by undergr0und to target specific clients. Additionally it serves dashb0ard and handles program compilation. It utilizes undergr0und for networking, behem0th for file-synchronization, and disc0very to determine if another server is already running in the network. \\
In that situation the start is interrupted, the Wallaby client is started and it connects to the available server instance, otherwise server and client are started. \\

\section{Conclusion}
After prolonged testing it was deemed reasonable to claim that fl0w can improve the Botball development work-flow on Wallaby controllers. Experienced Botball teams that would rather program in native tools than the browser-based Harrogate and want to observe their sensor-readouts in realtime can benefit from fl0w.

Networking boilerplate code can be cut down drastically with a fitting networking solution already in place.

Security was never a design goal, instead relying on network interface level security was chosen to save time. This assumption will cause problems in densely populated wireless networks.

There is a high amount of complexity involved when performing continuous file-synchronization with an undetermined amount of clients across multiple operating-systems and file-systems.

Support for Python as a robot programming language as well as basic remote procedure call functionality is the next development goal.

\section*{Acknowledgment}
The authors would like to thank Dr. Michael Stifter for making the existence of our robotics team possible, Daniel Maximilian Swoboda for answering all paper related questions, and the KIPR development team without whom the Wallaby Controller would not exist.

\begin{thebibliography}{1}

\bibitem{fl0w:Philip Trauner}
Philip Trauner, Christoph Heiss, Sebastian Schaffler, \emph{fl0w}, \url{https://github.com/robot0nfire/fl0w}, source code,
accessed February 9th 2017

\bibitem{Harrogate:KIPR}
KIPR, \emph{Harrogate}, \url{https://github.com/kipr/harrogate}, \\ source code,
accessed February 9th 2017

\bibitem{Sublime Text 3:Sublime HQ}
Sublime HQ, \emph{Sublime Text 3}, \url{https://www.sublimetext.com/3},\\ product page,
accessed February 9th 2017

\bibitem{Wallaby Controller:KIPR}
KIPR, \emph{Wallaby Controller},\\  \url{http://botballstore.org/product/wallaby-controller}, store page, accessed February 9th 2017

\bibitem{Python:Python Foundation}
Python Foundation, \emph{Python}, \url{https://www.python.org},\\ project page,
accessed February 9th 2017

\bibitem{undergr0und:Philip Trauner}
Philip Trauner, \emph{undergr0und}, \url{https://github.com/robot0nfire/fl0w/wiki/undergr0und}, implementation notes,
accessed February 9th 2017

\bibitem{ws4py:Philip Trauner}
Philip Trauner, \emph{ws4py}, \url{https://github.com/robot0nfire/ws4py},\\ source code,
accessed February 9th 2017

\bibitem{ECMAScript:Ecma}
Ecma International, \emph{ECMAScript}, \\\url{https://www.ecma-international.org/ecma-262/7.0/index.html}, language specification, accessed February 12th 2017

\bibitem{The WebSocket Protocol:A. Melnikov}
A. Melnikov, \emph{The WebSocket Protocol}, \url{https://tools.ietf.org/html/rfc6455},\\ request for comment,
accessed February 9th 2017

\bibitem{undergr0und.js:Philip Trauner}
Philip Trauner, \emph{undergr0und},\\ \url{https://github.com/robot0nfire/undergr0und.js}, source code, \\accessed February 9th 2017

\bibitem{dashb0ard:Sebastian Schaffler}
Sebastian Schaffler, Philip Trauner, \emph{dashb0ard}, \url{https://github.com/robot0nfire/dashb0ard}, source code,
accessed March 16th 2017

\bibitem{node-jspack:Peter Griess}
Peter Griess, \emph{node-jspack}, \url{https://github.com/pgriess/node-jspack},\\ source code,
accessed February 9th 2017

\bibitem{Node.js:Node.js Foundation}
Node.js Foundation, \emph{Node.js}, \url{https://nodejs.org},\\ product page,
accessed February 9th 2017

\bibitem{browserify:James Halliday}
James Halliday, \emph{browserify}, \url{http://browserify.org/},\\ product page,
accessed February 9th 2017

\bibitem{JSON:T. Bray Ed.}
T. Bray, Ed., \emph{JSON}, \url{https://tools.ietf.org/html/rfc7159},\\ request for comment,
accessed February 9th 2017

\bibitem{behem0th:Christoph Heiss}
Christoph Heiss, \emph{behem0th}, \url{https://github.com/robot0nfire/behem0th},\\ source code,
accessed February 9th 2017

\bibitem{watchdog:Yesudeep Mangalapilly}
Yesudeep Mangalapilly, \emph{watchdog}, \url{https://github.com/gorakhargosh/watchdog}, source code,
accessed February 9th 2017

\bibitem{Base64:S. Josefsson}
S. Josefsson, \emph{Base64}, \url{https://tools.ietf.org/html/rfc4648}, \\ request for comment,
accessed March 22nd 2017

\bibitem{Vue:Evan You}
Evan You, \emph{Vue.js}, \url{https://vuejs.org/},\\ product page,
accessed March 16th 2017

\bibitem{Bootstrap 3:Twitter Inc.}
Twitter, Inc., \emph{Bootstrap 3}, \url{http://getbootstrap.com},\\ product page,
accessed March 16th 2017

\bibitem{Flot:David Schnur}
David Schnur, \emph{Flot}, \url{https://github.com/flot/flot},\\ source code,
accessed February 9th 2017

\bibitem{jQuery:jQuery Foundation}
jQuery Foundation, \emph{jQuery}, \url{https://jquery.com/},\\ product page,
accessed February 9th 2017

\bibitem{edit0r:Philip Trauner}
Philip Trauner, \emph{edit0r}, \url{https://github.com/robot0nfire/fl0w/tree/master/Sublime/fl0w}, source code, accessed February 9th 2017

\bibitem{disc0very:Christoph Heiss}
Christoph Heiss, \emph{disc0very}, \url{https://github.com/robot0nfire/fl0w/blob/master/Shared/Disc0very.py}, source code, accessed March 30th 2017

\bibitem{UDP:J. Postel}
J. Postel, \emph{UDP}, \url{https://www.ietf.org/rfc/rfc768.txt},\\ request for comment, accessed March 30th 2017

\end{thebibliography}

\end{document}

ext: tex


text:
% -*- latex -*-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%
%%%% This text file is part of the source of
%%%% `Introduction to High-Performance Scientific Computing'
%%%% by Victor Eijkhout, copyright 2012-8
%%%%
%%%% This book is distributed under a Creative Commons Attribution 3.0
%%%% Unported (CC BY 3.0) license and made possible by funding from
%%%% The Saylor Foundation \url{http://www.saylor.org}.
%%%%
%%%% bookmacs : macros specifically for the book version
%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%
%%%% Outlining
%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{outliner}
\OutlineLevelStart 0{\frame{\section{#1}\Huge\bf #1}}
\OutlineLevelStart 1{\section{#1}}%{\frame{\section{#1}\Large\bf#1}}
\def\sectionframe#{\Level 0 }
\usepackage{framed}
\colorlet{shadecolor}{blue!15}
\OutlineLevelStart 2{\subsection{#1}
  \frame{\begin{shaded}\large #1\end{shaded}}}
%% \OutlineLevelCont 2{\end{frame}\begin{frame}{#1}}
%% \OutlineLevelEnd 2{\end{frame}}
%\OutlineTracetrue

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%
%%%% Exercises
%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcounter{excounter}
\newenvironment
    {exercise}[1]
    {
      \refstepcounter{excounter}
      \begin{frame}{Exercise \arabic{excounter}: #1}
    }
    {\end{frame}}


text:
% ---------------------------------------------------------------
% Document configuration setup.
%
% Sets up things like document format, page size and the libraries to use later
% ---------------------------------------------------------------

\documentclass[11pt, oneside]{article}   	% use "amsart" instead of "article" for AMSLaTeX format
\usepackage{geometry}                		% See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper}                   		% ... or a4paper or a5paper or ...
%\geometry{landscape}                		% Activate for for rotated page geometry
%\usepackage[parfill]{parskip}    		% Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}				% Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI mode
								% TeX will automatically convert eps --> pdf in pdflatex
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{arrows}
%\title{Brief Article}
%\author{The Author}
%\date{}							% Activate to display a given date or no date

% ---------------------------------------------------------------
% Start of the document itself
% ---------------------------------------------------------------
\begin{document}
%\maketitle

% ---------------------------------------------------------------
% tikz is the LaTeX library for drawing 2D figures.  Use the
% arrows library for drawing the number lines
% ---------------------------------------------------------------
\usetikzlibrary{arrows}
% ---------------------------------------------------------------
% This "document" is really a program itself.  At the top level,
% it's several loops that draw variations of each diagram; e.g.
% the first loop counts from 0..19 (1..20 in normal people's
% language), drawing number lines for hundredths.
% We're creating 20 different drawings, which will be named e.g.
% "Frac1 b6 diagram hundredths1", "Frac1 b6 diagram hundredths2",
% etc.  Note the "y+1" in the name so the diagrams are numbered
% 1..20 instead of 0..19.
%
% Note: the double backslashes (i.e. '\\') are significant.  They
% mean "treat this line as a comment".  Otherwise, latex thinks its
% empty lines that need to be written into the document.
% ---------------------------------------------------------------
\section{Hundredths}
%\subsection{}
\foreach \y in {0,1,2,3,4,5,6,7,8,9,10,11,12, 13, 14, 15, 16, 17, 18, 19}
{ Frac1 b6 diagram hundredths\the\numexpr\y+1
\\
\\
% ---------------------------------------------------------------
% Start drawing the pictures, beginning with the number line.
% ---------------------------------------------------------------
\begin{tikzpicture} [>=triangle 45, scale = 0.1]%use to change style of arrow head and scale of pic
\foreach \x in  {0,..., 107}%this tells you at which points to draw the lines and labels
\draw[shift={(\x,0)},color=black] (0pt,20pt) -- (0pt,-20pt);%this tells you the vert lines color and size
\foreach \x in  {0,..., 99}
\draw[shift={(\x,1.8)}] {rectangle(1,5.8)};
\foreach \z in  {0,10,20,30,40,50,60,70,80,90,100}%this tells you at which points to draw the lines and labels
\draw[shift={(\z,0)},color=black] (0pt,40pt) -- (0pt,-40pt);%this tells you the vert lines color and size
\draw[very thick, ->] (0,0) -- (110,0) ;
%\foreach \z in {0, 100}
%\draw[shift={(\z,0.3)}, color=black] {rectangle(1,0.7)};
\foreach \x in {0,100}
\draw[shift={(\x,0)},color=black] (0pt,0pt) -- (0pt,-12pt) node[below]{\LARGE\the\numexpr\x/100\relax}; %this tells you the labels under the vert lines
\foreach \x in {0,...,\y}
\draw[shift={(\x,1.8)}, fill=red] {rectangle(1,5.8)};

\end{tikzpicture}
\\}
%
% Next set of diagrams show hundredths and tenths.
%
\section{Hundredths and Tenths}
\foreach \y in {0,9,19, 29, 39, 49, 59, 69, 79, 89, 99}
{ Frac1 b6 diagram tenths and hundredths\the\numexpr\y+1
\\
\\
\begin{tikzpicture} [>=triangle 45, scale = 0.1]%use to change style of arrow head and scale of pic
\foreach \x in  {0,..., 107}%this tells you at which points to draw the lines and labels
\draw[shift={(\x,0)},color=black] (0pt,20pt) -- (0pt,-20pt);%this tells you the vert lines color and size
\foreach \x in  {0,..., 99}
\draw[shift={(\x,1.8)}] {rectangle(1,5.8)};
\foreach \z in  {0,10,20,30,40,50,60,70,80,90,100}%this tells you at which points to draw the lines and labels
\draw[shift={(\z,0)},color=black] (0pt,40pt) -- (0pt,-40pt);%this tells you the vert lines color and size
\foreach \x in {0,...,\y}
\draw[shift={(\x,1.8)}, fill=red] {rectangle(1,5.8)};
\foreach \w in  {0,10,20,30,40,50,60,70,80,90}%this tells you at which points to draw the lines and labels
\draw[shift={(\w,1.8)}, color = blue, line width = 0.5mm] {rectangle(10,5.8)};
\draw[very thick, ->] (0,0) -- (110,0) ;
\foreach \x in {0,100}
\draw[shift={(\x,0)},color=black] (0pt,0pt) -- (0pt,-12pt) node[below]{\LARGE\the\numexpr\x/100\relax}; %this tells you the labels under the vert lines

\end{tikzpicture}
\\}

\foreach \y in {0,6,14, 26, 32, 45, 57, 63, 78, 87, 92}
{ Frac1 b6 diagram tenths and hundredths\the\numexpr\y+1
\\
\\
\begin{tikzpicture} [>=triangle 45, scale = 0.1]%use to change style of arrow head and scale of pic
\foreach \x in  {0,..., 107}%this tells you at which points to draw the lines and labels
\draw[shift={(\x,0)},color=black] (0pt,20pt) -- (0pt,-20pt);%this tells you the vert lines color and size
\foreach \x in  {0,..., 99}
\draw[shift={(\x,1.8)}] {rectangle(1,5.8)};
\foreach \z in  {0,10,20,30,40,50,60,70,80,90,100}%this tells you at which points to draw the lines and labels
\draw[shift={(\z,0)},color=black] (0pt,40pt) -- (0pt,-40pt);%this tells you the vert lines color and size
\foreach \x in {0,...,\y}
\draw[shift={(\x,1.8)}, fill=red] {rectangle(1,5.8)};
\foreach \w in  {0,10,20,30,40,50,60,70,80,90}%this tells you at which points to draw the lines and labels
\draw[shift={(\w,1.8)}, color = blue, line width = 0.5mm] {rectangle(10,5.8)};
\draw[very thick, ->] (0,0) -- (110,0) ;
\foreach \x in {0,100}
\draw[shift={(\x,0)},color=black] (0pt,0pt) -- (0pt,-12pt) node[below]{\LARGE\the\numexpr\x/100\relax}; %this tells you the labels under the vert lines

\end{tikzpicture}
\\}

\foreach \y in {0,6,14, 26, 32, 45, 57, 63, 78, 87, 92}
{ Frac1 b6 diagram tenths and hundredths\the\numexpr\y+1
\\
\\
\begin{tikzpicture} [>=triangle 45, scale = 0.1]%use to change style of arrow head and scale of pic
\foreach \x in  {0,..., 107}%this tells you at which points to draw the lines and labels
\draw[shift={(\x,0)},color=black] (0pt,20pt) -- (0pt,-20pt);%this tells you the vert lines color and size
\foreach \x in  {0,..., 99}
\draw[shift={(\x,1.8)}] {rectangle(1,5.8)};
\foreach \z in  {0,10,20,30,40,50,60,70,80,90,100}%this tells you at which points to draw the lines and labels
\draw[shift={(\z,0)},color=black] (0pt,40pt) -- (0pt,-40pt);%this tells you the vert lines color and size
\foreach \x in {0,...,\y}
\draw[shift={(\x,1.8)}, fill=red] {rectangle(1,5.8)};
%\foreach \w in  {0,10,20,30,40,50,60,70,80,90}%this tells you at which points to draw the lines and labels
%\draw[shift={(\w,1.8)}, color = blue, line width = 0.5mm] {rectangle(10,5.8)};
\draw[very thick, ->] (0,0) -- (110,0) ;
\foreach \x in {0,100}
\draw[shift={(\x,0)},color=black] (0pt,0pt) -- (0pt,-12pt) node[below]{\LARGE\the\numexpr\x/100\relax}; %this tells you the labels under the vert lines

\end{tikzpicture}
\\}

\foreach \y in {0,1,2,3,4,5,6,7,8}
\foreach \q in {1,2,3, 4, 8}
{ Frac1 b6 diagram tenths blank  and hundredths\the\numexpr\y+1
\\
\\
\begin{tikzpicture} [>=triangle 45, scale = 0.1]%use to change style of arrow head and scale of pic
\foreach \x in  {0,..., 107}%this tells you at which points to draw the lines and labels
\draw[shift={(\x,0)},color=black] (0pt,20pt) -- (0pt,-20pt);%this tells you the vert lines color and size
%\foreach \x in  {0,..., 99}
%\draw[shift={(\x,1.8)}] {rectangle(1,5.8)};
\foreach \z in  {0,10,20,30,40,50,60,70,80,90,100}%this tells you at which points to draw the lines and labels
\draw[shift={(\z,0)},color=black] (0pt,40pt) -- (0pt,-40pt);%this tells you the vert lines color and size
\foreach \x in {0,...,\y}
\draw[shift={(\x*10,1.8)}, fill=red] {rectangle(10,5.8)};
\foreach \p in {0,...,\q}
\draw[shift={(\the\numexpr\y*10+10+\p,1.8)}, fill=yellow] {rectangle(1,5.8)};
\foreach \w in  {0,10,20,30,40,50,60,70,80,90}%this tells you at which points to draw the lines and labels
\draw[shift={(\w,1.8)}, color = blue, line width = 0.3mm] {rectangle(10,5.8)};
\draw[very thick, ->] (0,0) -- (110,0) ;
\foreach \x in {0,100}
\draw[shift={(\x,0)},color=black] (0pt,0pt) -- (0pt,-12pt) node[below]{\LARGE\the\numexpr\x/100\relax}; %this tells you the labels under the vert lines

\end{tikzpicture}
\\}

\foreach \y in {0,1,2,3,4,5,6,7,8}
\foreach \q in {1,2,3,4,8}
{ Frac1 b6 diagram tenths  and hundredths\the\numexpr\y+1
\\
\\
\begin{tikzpicture} [>=triangle 45, scale = 0.1]%use to change style of arrow head and scale of pic
\foreach \x in  {0,..., 107}%this tells you at which points to draw the lines and labels
\draw[shift={(\x,0)},color=black] (0pt,20pt) -- (0pt,-20pt);%this tells you the vert lines color and size
%\foreach \x in  {0,..., 99}
%\draw[shift={(\x,1.8)}] {rectangle(1,5.8)};
\foreach \z in  {0,10,20,30,40,50,60,70,80,90,100}%this tells you at which points to draw the lines and labels
\draw[shift={(\z,0)},color=black] (0pt,40pt) -- (0pt,-40pt);%this tells you the vert lines color and size
\foreach \x in {0,...,\the\numexpr\y*10+10}
\draw[shift={(\x,1.8)}, fill=red] {rectangle(1,5.8)};
\foreach \p in {0,...,\q}
\draw[shift={(\the\numexpr\y*10+10+\p,1.8)}, fill=yellow] {rectangle(1,5.8)};
\foreach \w in  {0,10,20,30,40,50,60,70,80,90}%this tells you at which points to draw the lines and labels
\draw[shift={(\w,1.8)}, color = blue, line width = 0.3mm] {rectangle(10,5.8)};
\draw[very thick, ->] (0,0) -- (110,0) ;
\foreach \x in {0,100}
\draw[shift={(\x,0)},color=black] (0pt,0pt) -- (0pt,-12pt) node[below]{\LARGE\the\numexpr\x/100\relax}; %this tells you the labels under the vert lines

\end{tikzpicture}
\\}

\foreach \y in {0,1,2,3,4,5,6,7,8,9}
\foreach \q in {1,2,3, 4,8}
{ Frac1 b6 diagram tenths blank  \the\numexpr\y+1
\\
\\
\begin{tikzpicture} [>=triangle 45, scale = 0.1]%use to change style of arrow head and scale of pic
\foreach \x in  {0,..., 107}%this tells you at which points to draw the lines and labels
\draw[shift={(\x,0)},color=black] (0pt,20pt) -- (0pt,-20pt);%this tells you the vert lines color and size
%\foreach \x in  {0,..., 99}
%\draw[shift={(\x,1.8)}] {rectangle(1,5.8)};
\foreach \z in  {0,10,20,30,40,50,60,70,80,90,100}%this tells you at which points to draw the lines and labels
\draw[shift={(\z,0)},color=black] (0pt,40pt) -- (0pt,-40pt);%this tells you the vert lines color and size
\foreach \x in {0,...,\y}
\draw[shift={(\x*10,1.8)}, fill=red] {rectangle(10,5.8)};
%\foreach \p in {0,...,\q}
%\draw[shift={(\the\numexpr\y*10+10+\p,1.8)}, fill=yellow] {rectangle(1,5.8)};
\foreach \w in  {0,10,20,30,40,50,60,70,80,90}%this tells you at which points to draw the lines and labels
\draw[shift={(\w,1.8)}, color = blue, line width = 0.3mm] {rectangle(10,5.8)};
\draw[very thick, ->] (0,0) -- (110,0) ;
\foreach \x in {0,100}
\draw[shift={(\x,0)},color=black] (0pt,0pt) -- (0pt,-12pt) node[below]{\LARGE\the\numexpr\x/100\relax}; %this tells you the labels under the vert lines

\end{tikzpicture}
\\}

\end{document}

max_stars_repo_name: sfinnie/olicogen

max_issues_repo_name: sfinnie/olicogen

max_forks_repo_name: sfinnie/olicogen


text:
\section{Model Setup}
TagSLAM uses a few simple abstractions with which complex scenarios
can be built without the need to write any code. This section will
introduce the concepts and establish the necessary notation.

We denote as $\ctrans{B}{T}{A}$ an SE(3) transform that takes vector
coordinates $\cvec{A}{X}$ in reference system $A$ and expresses them in $B$:
\begin{equation}
\cvec{B}{X} = \ctrans{B}{T}{A}\cvec{A}{X}.
\end{equation}
Such a transform defines a pose. We distinguish two kinds:
\begin{itemize}
  \item Static pose: the transform $\ctrans{B}{T}{A}$ is independent
    of time. A static poses is represented by a single variable for
    the optimization process. Note that this does not mean the pose
    must be known from the beginning (i.e have a prior), but could be
    discovered as image data becomes available.
  \item Dynamic pose: the transform $\ctrans{B}{T}{A}(t)$ is time
    dependent. Such a pose is assumed to change, i.e. the optimizer
    will allocate a new variable for every time step $t$. Sufficient
    input data must be provided at time $t$ to solve for
    $\ctrans{B}{T}{A}(t)$.
\end{itemize}

A {\em body} is an object that can have tags and cameras attached to
it. Its pose is always given with respect to world coordinates, and
can be classified as static or dynamic depending on the nature of the
body. For static bodies, an optional prior pose may be specified.

Tags must have a unique id, and each tag must be associated with a
body to which it is attached. Tags without association are ignored,
unless a default body is specified to which any unknown tag will be
attached upon discovery.  In contrast to body poses, tag poses are
{\em always static}, and are expressed with respect to the pertaining
body. A tag pose prior is optional, so long as that is not required to
determine the body pose.

Camera poses, like tag poses, are {\em static}, and given with respect
to the body to which the camera is attached. This body is referred to
as the camera's ``rig'', although from a modeling point of view, it is
a body like any other, and can have for instance tags attached to
it. A prior camera pose (extrinsic calibration) is optional provided
the optimization problem can be solved without it.

With bodies, tags, and cameras, a rich set of SLAM problems can be
modeled, as shown for a simple single-camera scenario in Figure
\ref{fig:scene_with_block}. It is sufficient to provide the static
priors for the lab-to-world ($\ctrans{\mathrm{w}}{T}{l}$),
tag-2-to-lab ($\ctrans{l}{T}{2}$), tag-105-to-block
($\ctrans{\mathrm{b}}{T}{105}$), and camera-to-rig transform
($\ctrans{\mathrm{r}}{T}{\mathrm{c}}$).  The remaining poses
$\ctrans{\mathrm{w}}{T}{\mathrm{b}}(t)$ and
$\ctrans{\mathrm{w}}{T}{\mathrm{r}}(t)$, as well as the missing poses
of the tags on the block can be determined from the images arriving at
the camera.


text:
\SetAPI{J-C}
\section{ambeth.merge.exact.version.required}
\label{configuration:AmbethMergeExactVersionRequired}
\ClearAPI
Defines whether the exact version is needed to avoid an OptimisticLockException during update of an entity or all versions equals or higher are accepted. Valid values are "true" and "false".
%% GENERATED USAGE REFERENCE - DO NOT EDIT
\begin{longtable}{ l l } \hline \textbf{Used in bean} & \textbf{Module} \
	\endhead
	\hline
		\type{com.koch.ambeth.merge.MergeController} &
		\prettyref{module:Merge} \\
	\hline
		\type{com.koch.ambeth.merge.MergeController} &
		\prettyref{module:Merge} \\
	\hline
		\type{com.koch.ambeth.persistence.jdbc.JdbcTable} &
		\prettyref{module:Persistence} \\
	\hline
		\type{com.koch.ambeth.persistence.jdbc.JdbcTable} &
		\prettyref{module:Persistence} \\
	\hline
\end{longtable}
%% GENERATED USAGE REFERENCE END
\type{com.koch.ambeth.merge.config.MergeConfigurationConstants.ExactVersionForOptimisticLockingRequired}
\begin{lstlisting}[style=Props,caption={Usage example for \textit{ambeth.merge.exact.version.required}}]
ambeth.merge.exact.version.required=false
\end{lstlisting}

max_stars_repo_name: Dennis-Koch/ambeth

max_issues_repo_name: Dennis-Koch/ambeth

max_forks_repo_name: Dennis-Koch/ambeth


text:
\documentclass{article}

\title{HISTORIC VIEWS OF PROGRAMMING LANGUAGES}
\date{2021-10-2}
\author{Nwoye Kamsiyochukwu}
\begin{document}
	\pagenumbering{gobble}
	\maketitle
	\newpage
	\pagenumbering{arabic}

	\section{HISTORY OF PYTHON;}
	Python is an interpreted, general-purpose and high-level programming language developed by Guido van Rossum in the late 1980s at the National Research Institute for Mathematics and Computer Science in Amsterdam.
	It was derived or rather considered a successor to ABC programming language which was designed to teach programming language in the early 1980s by Lambert Meertens, Leo Geurts and others at the CWI(Centrum Wiskunde and Informatica, a National Research Institute).
	When compared to other programming language it is well known for its simple programming syntax, code readability and English-like commands, due to this, it is the most preferred and most popular programming language.
	It is used in  development, scripting and software testing, apps such as Instagram, search engines such as google and games like battlefield made use of python.
	The programming language offers may programming libraries like NumPy, Pandas, Matplotlib etc. There are IDEs in association with python sch as IDLE, PyCharm, Visual studio code, Atom etc. Also PERL happens to be similar programming language to python.

	\section{HISTORY OF JAVA;}
	It was developed by a team lead by James Gosling at Sun Microsystems. It was originally called “oak” and was designed in 1991 but later renamed in 1995 to what we now know as JAVA.
	It was originally designed for use in embedded chips in consumer electronic appliances but in 1995 after being named JAVA it was redesigned for developing internet application. It is also used in developing codes to communicate with and control the robotic rover(vehicles) on mars.
	It is simple, object oriented, portable and dynamic.
	IDEs associated with JAVA are Eclipse, Kite, IntelliJ IDEA etc.
	JAVA as a programming language can be used to develop web application (amazon), mobile application, scientific application, web servers and application servers.
	\newpage
	\section{HISTORY OF HTML;}
	It is a programming language that was developed by Tim Berners Lee (also the person that developed the World Wide Web) in 1993.It is a markp language designed to link web pages.
	It was developed due to the fact that he was frustrated from having to log onto different compters to find different information from them and sought to seek a solution to it.
	He figured that there must be a way to hop from one set of information to another thats on different computers. This concept of a hyper-text system (connected with the networking technology and protocols needed to pass information between computers) would go on to form the basis for the fundamental language of the world wide web (HTML).
	It is used in web pages development, web document creation, internet navigation etc.
	IDEs associated with HTML are RJ TextEd, NetBeans etc.
	\newpage
	\section{FORTRAN;}
	It is a general-purpose, compiled programming language developed by IBM(International Business Machines Cooperation) in 1950 for scientific and engineering applications.
	Its name was derived from FORmula TRANslating system .
	Its is basically used for scientific and engineering computing.
	IDEs associated with FORTRAN is GNUplot, geany etc.

\end{document}

max_stars_repo_path: my tex studio stuff/assignment(slides).tex


text:
\subsection{alias APIs}

Alias APIs for creating nicknames for UUIDs and other long strings
\par
The alias set of APIs provide a set of `alias' management functions for
creating and managing aliases for long strings such as UUIDs. If an alias'
name is used as a parameter value in any API call, that parameter will see
the alias' value instead. Given that references to all sentinels, walkers,
nodes, etc. utilize UUIDs, it becomes quite useful to create pneumonic
names for them. Also, when registering   sentinels, walkers, architype
handy aliases are automatically generated. These generated aliases can
then be managed using the alias APIs. Keep in mind that whenever an alias
is created, all parameter values submitted to any API with the alias name
will be replaced internally by its value. If you get in a bind, simply use
the clear or delete alias APIs.

\subsubsection{alias clear}

\subsubsection{alias delete}

\subsubsection{alias list}

\subsubsection{alias register}

\subsection{architype APIs}

Architype APIs for creating and managing Jaseci architypes
\par
The architype set of APIs allow for the addition and removing of
architypes. Given a Jac implementation of an architype these APIs are
designed for creating, compiling, and managing architypes that can be
used by Jaseci. There are two ways to add an architype to Jaseci, either
through the management of sentinels using the sentinel API, or by
registering independent architypes with these architype APIs. These
APIs are also used for inspecting and managing existing arichtypes that
a Jaseci instance is aware of.

\subsubsection{architype delete}

\subsubsection{architype get}

\subsubsection{architype list}

\subsubsection{architype register}

\subsubsection{architype set}

\subsection{config APIs}

Admin config APIs
Abstracted since there are no valid configs in core atm, see jaseci\_serv
to see how used.

\subsubsection{config delete}

\subsubsection{config exists}

\subsubsection{config get}

\subsubsection{config list}

\subsubsection{config set}

\subsection{global APIs}

Admin global APIs

\subsubsection{global delete}

\subsubsection{global sentinel set}

\subsubsection{global sentinel unset}

\subsubsection{global set}

\subsection{graph APIs}

Graph APIs

\subsubsection{graph active get}

\subsubsection{graph active set}

\subsubsection{graph active unset}

\subsubsection{graph create}

\subsubsection{graph delete}

\subsubsection{graph get}

\subsubsection{graph list}

\subsubsection{graph node get}

\subsubsection{graph node set}

\subsection{logger APIs}

APIs for Jaseci Logging configuration

\subsubsection{logger http clear}

\subsubsection{logger http connect}

\subsubsection{logger list}

\subsection{master APIs}

Master APIs for creating nicknames for UUIDs and other long strings
\par

\subsubsection{master active get}

\subsubsection{master active set}

\subsubsection{master active unset}

\subsubsection{master create}

\subsubsection{master delete}

\subsubsection{master get}

\subsubsection{master list}

\subsection{object APIs}

Object APIs for generalized operations on Jaseci objects
\par
...

\subsubsection{global get}

\subsubsection{object get}

\subsubsection{object perms get}

\subsubsection{object perms grant}

\subsubsection{object perms revoke}

\subsubsection{object perms set}

\subsection{public APIs}

Public  APIs

\subsubsection{walker summon}

\subsection{sentinel APIs}

Sentinel APIs

\subsubsection{sentinel active get}

\subsubsection{sentinel active global}

\subsubsection{sentinel active set}

\subsubsection{sentinel active unset}

\subsubsection{sentinel delete}

\subsubsection{sentinel get}

\subsubsection{sentinel list}

\subsubsection{sentinel pull}

\subsubsection{sentinel register}

\subsubsection{sentinel set}

\subsection{super APIs}

Super APIs for creating nicknames for UUIDs and other long strings
\par

\subsubsection{master createsuper}

\subsection{walker APIs}

Walker APIs

\subsubsection{walker delete}

\subsubsection{walker execute}

\subsubsection{walker get}

\subsubsection{walker list}

\subsubsection{walker prime}

\subsubsection{walker register}

\subsubsection{walker run}

\subsubsection{walker set}

\subsubsection{walker spawn create}

\subsubsection{walker spawn delete}

\subsubsection{walker spawn list}


text:
\openepigraph{The simple act of paying attention can take you a long way.
}{---Keanu Reeves}

In the second mini-project, you will read, summarize and discuss the paper by \citeauthor{raz_suggestion_2006} (2013)\cite{raz_suggestion_2006}. This paper provides some background about the Stroop effect, which is a classic measure of selective attention, and then shows one manipulation that effectively helps people overcome Stroop interference. Your task in this lab will be to replicate the Stroop effect in one condition, and then attempt to change the size of the effect (make larger or smaller) in another condition.

\section{What's in store}

\begin{enumerate}
\item Students read paper and write QALMRI (15-20)
\item	Group discussion about paper (15-20)
\item	Students instructed their task is create their own Stroop design and employ a manipulation that increases or decreases the size of the Stroop effect
\item	Students break into groups and conduct a Stroop experiment, measuring the size of the Stroop effect in a "normal" condition, and in their manipulated condition.
\item	Groups analyze conduct a 2x2 ANOVA to see if their interaction was significant
\end{enumerate}

\section{Some background on the Stroop effect}

The Stroop effect is a well-known and classic phenomena in experimental psychology. The effect was first reported by J. R. Stroop (1935). Several hundreds of Stroop experiments have been conducted since 1935 and these experiments are summarized in Macleod's (1992) review.\cite{Stroop1935,macleod_half_1991}

The original Stroop task involved color naming of word stimuli that are printed in different ink colors. There are two important conditions involving congruent and incongruent item types. \emph{Congruent} items occur when the ink-color of the word matches the name of the word (e.g., the word red printed in red ink: \textcolor{red}{RED}). Incongruent items occur when the ink-color of the word does not match the name of the word (e.g., the word blue printed in red ink: \textcolor{red}{BLUE}). For each of these stimuli the task is to identify the ink-color of the word and ignore the written meaning of the word. Here are a few more examples of congruent and incongruent Stroop items:

Congruent: 	\textcolor{blue}{BLUE}, \textcolor{green}{GREEN}, \textcolor{yellow}{YELLOW}, \textcolor{red}{RED}

Incongruent:	\textcolor{red}{BLUE}, \textcolor{blue}{GREEN}, \textcolor{red}{YELLOW}, \textcolor{green}{RED}

In the original set of experiments participants were presented with long lists of items and asked to read through the lists naming only the ink-colors and ignoring the word information. The important finding was that people were faster to finish reading lists that were composed of congruent items than incongruent items. This difference in reading time is termed the Stroop effect. For example, let’s say you were given a list of 60 congruent words and you read all of the ink-color names in 71 seconds. Next, you receive a list of 60 incongruent words and it takes you 94 seconds to read all of the ink-color names. You would compute your Stroop effect by taking the difference between the Congruent and Incongruent reading times. Congruent reading times are subtracted from incongruent reading times to give a positive Stroop effect value:

Stroop effect = Incongruent – Congruent  = 94 seconds – 71 seconds =  23 seconds

The Stroop test can be administered in many different ways. A common modern variant of the task is to present a single Stroop item on a computer screen per trial and have participants identify the ink-color by pressing a key or typing out the response. Several trials could be presented over the course of an experimental session, and the experimenter could vary whether upcoming trials are congruent or incongruent. The trial-based version of the Stroop procedure provides more experimental control and more precise measurement of reaction times.  This provides a more fine-grained measure of the time taken to respond congruent and incongruent items. Stroop effects using this procedure are usually measured in the milliseconds (ms). For example, reaction times for congruent items are usually around 500 ms, and reaction times for incongruent items are usually around 600 ms. So, the overall Stroop effect might be around 100 ms.

\subsection{Stroop and Selective Attention}

The Stroop effect has been used as a tool to study various aspects of learning and attention. For example the Stroop effect has been used as a tool to study cognitive control. Cognitive control refers broadly to the psychological processes that allow people to plan, coordinate, and execute actions necessary to accomplish goals. A central aspect of cognitive control involves the attention processes that are responsible for selecting task-relevant information and ignoring task-irrelevant information when performing a task.

The Stroop procedure provides a simple, yet effective, method for presenting people with two sources of information, one that is task-relevant (color) and one that is task-irrelevant (word). For this reason, Stroop items are sometimes referred to as bi-valent stimuli, in that they present two sources of information. Congruent Stroop items (blue in blue) do not present much of a selective attention challenge, both the word and the color information point to the same response. Incongruent items (blue in red) do present a selective attention challenge, the color points to the correct response and the word points to an incorrect response. When faced with incongruent items people must pay attention to the relevant color information and ignore or somehow filter out the irrelevant word information. The fact that people get Strooped, or that the Stroop effect exists at all, tells us something important about selective attention in this task. Specifically, people can not completely ignore the irrelevant word information. If people could completely ignore the irrelevant word information then the Stroop effect would cease to appear. People would be just as fast identifying congruent and incongruent items because they would be able to successfully ignore word information.

Using the logic above the Stroop effect is often taken as a measure of selective attention ability. This means that changes in the size of the Stroop effect may represent differences in selective attention ability. People who have very large Stroop effects have poor attentional control over their ability to ignore the word stimulus. People who have very small Stroop effects have excellent attentional control over their ability to ignore the word stimulus.


text:
\documentclass{beamer}
%
% Choose how your presentation looks.
%
% For more themes, color themes and font themes, see:
% http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html
%

\mode<presentation>
{
  \usetheme{Madrid}      % or try Darmstadt, Madrid, Warsaw, ...
  \usecolortheme{beaver} % or try albatross, beaver, crane, ...
  \usefonttheme{default}  % or try serif, structurebold, ...
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
}
\usepackage{pifont}
\usepackage[bookmarks]{hyperref}
\usepackage[backend=bibtex]{biblatex}
\usepackage{braket}
\addbibresource{bibliography.bib}
\newtheorem*{remark}{Remark}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usebackgroundtemplate{\includegraphics[width=\paperwidth]{Pic/Intro.jpg}}
\title[Probabilistic modeling project]{Hazardous asteroids forecast via Markov random fields}
\subtitle{Project for the exam: Probabilistic Modelling (DSE)}
\author{Marzio De Corato}
\date{\today}

\begin{document}

\begin{frame}
\vspace{+4.2 cm}  \titlepage
\end{frame}

\usebackgroundtemplate{ }

% Uncomment these lines for an automatically generated outline.
%\begin{frame}{Outline}
%\setcounter{tocdepth}{1}
%\begin{center}
%  \tableofcontents
%\end{center}
%\end{frame}

\section{Intro}

\begin{frame}{Introduction}

\begin{itemize}
\item \textbf{Final Goal} Assessment of forecasts and interpretability for different machine learning algorithms, including the probabilistic models
\item \textbf{Method} Use a dataset for which the laws that interconnect the different features are known from general principles
\item \textbf{Dataset} CNEOS asteroids dataset for more than 3500 asteroids
\item \textbf{Theoretical laws} Celestial mechanics
\item \textbf{Algorithms involved - probabilistic models} GLASSO, mgm, minforest, mmod
\item \textbf{Algorithms involved - others} Random forest, Support Vector Machines, Quadratic Discriminant Analysis, Logistic Regression

\end{itemize}

\end{frame}

\section{Celestial mechanics}

\begin{frame}{}
\begin{center}
{\Huge Celestial mechanics}
\end{center}
\end{frame}

\begin{frame}{Celestial mechanics \cite{murray1999solar}: equations of motion}

\begin{center}
The interaction between a planet of mass $m_{1}$ at the  position $r_{1}$ (inertial frame) and an asteroid of mass $m_{2}$  at the position $r_{2}$ is given by:
\end{center}

\begin{equation}
\textbf{F}_{1}=\mathcal{G} \cdot \frac{m_{1}m_{2}}{r^{3}}\textbf{r}=m_{1} \ddot{\textbf{r}}_{1}\quad \textbf{F}_{2}=-\mathcal{G} \cdot \frac{m_{1}m_{2}}{r^{3}}\textbf{r}=m_{2} \ddot{\textbf{r}}_{2}
\end{equation}

\begin{center}
Where $\mathcal{G}$ is the universal gravitational constant. If we consider the motion of the second item with respect to the first one
\end{center}

\begin{equation}
\ddot{\textbf{r}}=\ddot{\textbf{r}}_{2}-\ddot{\textbf{r}}_{1} \quad \mu=\mathcal{G}(m_{1}+m_{2})
\end{equation}

\begin{equation}
\dfrac{d^{2}\textbf{r}}{dt^{2}}+\mu\dfrac{\textbf{r}}{r^{3}}=0
\end{equation}

\begin{center}
$\textbf{r} \times \ddot{ \textbf{r}}=0  \implies $ $\textbf{r}$  and $\dot{\textbf{r}}$ lies in the same plane

\end{center}
\end{frame}

\begin{frame}{Celestial mechanics \cite{murray1999solar}: equations of motion}
\begin{center}
Integrating $\textbf{r} \times \ddot{ \textbf{r}}=0$
\end{center}

\begin{equation}
\textbf{r} \times \dot{ \textbf{r}}=\textbf{h}
\end{equation}

\begin{center}
Where \textbf{h}  is a constant of Integration. Using the polar coordinates  $\hat{\textbf{r}}$ and $\hat{\boldsymbol{\theta}}$
\end{center}

\begin{equation}
\textbf{r}=r\hat{\textbf{r}}
\end{equation}

\begin{equation}
\dot{\textbf{r}}=\dot{r}\hat{\textbf{r}}+r\dot{\theta}\hat{\boldsymbol{\theta}}
\label{eq_dyn_nop}
\end{equation}

\begin{equation}
\ddot{\textbf{r}}=\left(\ddot{r}-r\dot{\theta}^{2}\right)\hat{\textbf{r}}+\left[\dfrac{1}{r}\frac{d}{dt}\left(r^{2}\dot{\theta}\right)\right]\hat{\boldsymbol{\theta}}
\end{equation}

\begin{equation}
\textbf{h}=r^{2}\dot{\theta}\hat{\textbf{z}}
\end{equation}

\begin{equation}
h=r^{2}\dot{\theta}
\end{equation}

\end{frame}

\begin{frame}{Celestial mechanics \cite{murray1999solar}: $2^{th}$ Kepler law}

\begin{figure}[h]
\begin{center}
\includegraphics[width=0.3\textwidth]{Pic/Area_dynamics.png}
\caption{\cite{murray1999solar}}
\label{Area_dynamics}
\end{center}
\end{figure}

\begin{equation}
\delta A \approx \dfrac{1}{2} r(r+dr)\sin(\delta\theta) \approx  \dfrac{1}{2} r^{2}\delta\theta
\end{equation}

\begin{equation}
\dfrac{dA}{dt}=\dfrac{1}{2}r^{2}\dfrac{d\theta}{dt}=\dfrac{1}{2}h
\end{equation}

\begin{center}
$h$ is constant $\implies$ $2^{th}$ Kepler law
\end{center}

\end{frame}

\begin{frame}{Celestial mechanics \cite{murray1999solar}: $1^{th}$ Kepler law}
\begin{center}
Using the substitution $u=\dfrac{1}{r}$ $h=r^{2}\dot{\theta}$
\end{center}

\begin{equation}
\dot{r}=-\frac{1}{u}\dfrac{du}{d\theta}\dot{\theta}=-h\frac{du}{d\theta}
\end{equation}

\begin{equation}
\ddot{r}=-h\dfrac{d^{2}u}{d\theta^{2}}\dot{\theta}=-h^{2}u^{2}\frac{d^{2}u}{d\theta^{2}}
\end{equation}

\begin{equation}
\dfrac{d^{2}u}{d\theta^{2}}+u=\frac{\mu}{h^{2}}
\end{equation}

\begin{equation}
u=\frac{\mu}{h^{2}}\left[1+e\cos(\theta-\phi)\right]
\end{equation}

\end{frame}

\begin{frame}{Celestial mechanics \cite{murray1999solar}: $1^{th}$ Kepler law}
\begin{columns}
\column{0.5\textwidth}
\begin{equation}
r=\dfrac{p}{1+e\cos(\theta-\phi)}
\end{equation}

\begin{center}
$e$ is \textcolor{red}{eccentricity}
\end{center}

\begin{itemize}
\item circle:  $e=0$ \quad $p=a$
\item ellipse: $0<e<1$ \quad $p=a(1-e^{2})$
\item parabola: $e=1$ \quad $p=2q$
\item hyperbola: $e>1$ \quad $p=a(e^{2}-1)$
\end{itemize}
\begin{center}
$a$ is the  \textcolor{red}{semi-major axis} of the conic
\end{center}
\column{0.4\textwidth}
\begin{figure}[h]
\begin{center}
\includegraphics[width=\textwidth]{Pic/Conics.png}
\caption{\cite{murray1999solar}}
\label{Area_dynamics}
\end{center}
\end{figure}

\end{columns}
\end{frame}

\begin{frame}{Celestial mechanics \cite{murray1999solar}: $3^{th}$ Kepler law}
\begin{columns}
\column{0.4\textwidth}

\begin{figure}[h]
\begin{center}
\includegraphics[width=\textwidth ]{Pic/Elliptical_orbit.png}
\caption{\cite{murray1999solar}}
\label{Area_dynamics}
\end{center}
\end{figure}

\column{0.6\textwidth}
\begin{equation}
b^{2}=a^{2}(1-e^{2})
\end{equation}

\begin{equation}
r=\frac{a(1-e^{2})}{1+e\cdot cos(\theta-\phi)}
\label{eq-mot}
\end{equation}

\begin{center}
Area swept in one \textcolor{red}{orbital period} T
\end{center}
\begin{center}
$A=\pi ab$
\end{center}
\begin{center}
We know that: $hT/2 \quad h^{2}=\mu a(1-e^{2})$
\end{center}
\begin{center}
Therefore
\end{center}
\begin{equation}
T^{2}=\dfrac{4\pi^{2}}{\mu}a^{3}
\end{equation}

\end{columns}
\end{frame}

\begin{frame}{Celestial mechanics \cite{murray1999solar}: $3^{th}$ Kepler law}

\begin{center}
Consider two asteroids of mass $m$ and $m'$ orbiting the Earth $m_{c}$ , with semi-major axes $a$ and $a'$ and orbital periods $T$ and $T'$
\end{center}

\begin{equation}
\frac{m_{c}+m}{m_{c}+m'}=\left(\frac{a}{a'}\right)^{3}\left(\frac{T'}{T}\right)^{2}
\end{equation}

But since $m$,$m'<<m_{c}$

\begin{equation}
\left(\frac{a}{a'}\right)^{3}\approx \left(\frac{T}{T'}\right)^{2}
\end{equation}

\begin{center}
\textbf{Remark:} The mass of the asteroids is \textbf{not} involved
\end{center}

\end{frame}

\begin{frame}{Celestial mechanics \cite{murray1999solar}: Orbital parameters}
\begin{center}
\textcolor{red}{Mean motion} $n=\frac{2\pi}{T}$
\end{center}

\begin{equation}
v_{perihelion}=na\sqrt{\dfrac{1+e}{1-e}}
\end{equation}

\begin{equation}
v_{aphelion}=na\sqrt{\dfrac{1-e}{1+e}}
\end{equation}

\begin{center}
\textbf{Remark:} The mean motion of an asteroid is different with respect to the the asteroid relative velocity (measured from Earth), since the latter is different at the perihelion an at the aphelion
\end{center}

\end{frame}

\begin{frame}{Celestial mechanics \cite{murray1999solar}: Orbital parameters}
\begin{columns}
\column{0.4\textwidth}
\begin{figure}[h]
\begin{center}
\includegraphics[width=\textwidth ]{Pic/Mean_anomaly.png}
\caption{\cite{murray1999solar}}
\label{Area_dynamics}
\end{center}
\end{figure}
\column{0.6\textwidth}
\begin{center}
\textcolor{red}{Mean anomaly}
\end{center}
\begin{equation}
M=n(t-\tau)
\end{equation}

\begin{center}
\begin{itemize}
\item $M=f=0$\quad$t=\tau$\quad Perihelion
\item $M=f=\pi$\quad$t=\tau+T/2$ \quad Aphelion
\end{itemize}
\end{center}

\begin{equation}
M=E-e\sin E
\end{equation}
\begin{center}
\textcolor{red}{Jupiter Tisserard invariant }
\end{center}
\begin{equation}
T_{P}=\frac{a_{p}}{a}+2\cos I\sqrt{\dfrac{a}{a_{p}}(1-e^{2})}
\end{equation}
\end{columns}
\end{frame}

\begin{frame}{Celestial mechanics \cite{murray1999solar}: Orbital parameters}

\begin{figure}[h]
\begin{center}
\includegraphics[width=0.6\textwidth ]{Pic/Inclination.png}
\caption{\cite{murray1999solar}}
\label{Area_dynamics}
\end{center}
\end{figure}

\begin{center}
I: \textcolor{red}{inclination} of the orbit
\end{center}
\begin{center}
$\Omega$: \textcolor{red}{longitude of the ascending node}
\end{center}
\end{frame}

\begin{frame}{Celestial mechanics \cite{murray1999solar}: Magnitude}
\begin{equation}
\Phi=\frac{L}{4\pi d^{2}}
\end{equation}
\begin{equation}
m=-2.5\log_{10}\Phi+C
\end{equation}
\begin{equation}
m_{1}-m_{2}=-2.5\log_{10}\frac{\Phi_{1}}{\Phi_{2}}
\end{equation}
\begin{equation}
M-m=-2.5\log_{10}\frac{\Phi\cdot d^{2} }{\Phi\cdot 10^{2}}
\end{equation}
\begin{equation}
M=m+5-5log_{10}d
\end{equation}
Where $\Phi$ is the flux for a sphere of radius r, m the relative magnitude and M the \textcolor{red}{Absolute magnitude}
\end{frame}

\begin{frame}{Celestial mechanics \cite{nasa_classification}: Classification}
\begin{figure}[h]
\begin{center}
\includegraphics[width=\textwidth]{Pic/neo_orbit_types.jpg}
\caption{\cite{nasa_classification}}
\label{Area_dynamics}
\end{center}
\end{figure}
\end{frame}

\begin{frame}{Celestial mechanics \cite{nasa_classification}: Classification}
\begin{itemize}
\item \textbf{Potentially Hazardous Asteroids}: MOID $\leq 0.05$ au $M \leq22.0$ \textit{NEAs whose Minimum Orbit Intersection Distance (MOID) with the Earth is 0.05 au or less and whose absolute magnitude (M) is 22.0 or brighter}
\end{itemize}
\end{frame}

\section{Dataset}

\begin{frame}{}
\begin{center}
{\Huge Dataset}
\end{center}
\end{frame}

\begin{frame}{Dataset}
\begin{itemize}

\item The asteroid dataset was retrieved from Kaggle \cite{kaggle_dataset}, which reports into a more machine readable form the dataset of The Center for Near-Earth Object Studies (CNEOS) \cite{cneos+nasa}, a NASA research centre.

\item 3552 Asteroids

\item Among the 40 the features, the ones connected only to the other name of
the asteroid, or connected only to the name of the orbit and
the one connected with the orbiting planet ( since for all it was
the Earth) were discarted

\item The proportion hazardous/not hazardous was set 1:5

\item The continuous measures were standardised and demeaned

\end{itemize}
\end{frame}

\begin{frame}{Features}
\begin{table}[]
\begin{center}
\begin{tabular}{c|c}
\hline
\textbf{Features}             & \textbf{Type}        \\ \hline
Neo Reference ID              & not used             \\ \hline
Absolute Magnitude            & Continuous           \\ \hline
Est Dia in KM (min)           & Continuous           \\ \hline
Est Dia in KM (max)           & Continuous           \\ \hline
Close Approach Date           & Continuous           \\ \hline
Epoch Date Close Approach     & Continuous           \\ \hline
Relative\_Velocity            & Continuous           \\ \hline
Miss\_Dist                    & Continuous           \\ \hline
Min\_Orbit\_Intersection      & Continuous           \\ \hline
Jupiter\_Tisserand\_Invariant & Continuous           \\ \hline
Epoch\_Osculation             & Continuous           \\ \hline
Eccentricity                  & Continuous           \\ \hline

\end{tabular}
\end{center}
\label{tab_features}
\end{table}

\end{frame}

\begin{frame}{Features}
\begin{table}[]
\begin{center}
\begin{tabular}{c|c}
\hline
\textbf{Features}             & \textbf{Type}        \\ \hline
Semi Major Axis               & Continuous           \\ \hline
Inclination                   & Continuous           \\ \hline
Asc Node Longitude            & Continuous           \\ \hline
Orbital Period                & Continuous           \\ \hline
Perihelion Distance           & Continuous           \\ \hline
Perihelion Arg                & Continuous           \\ \hline
Perihelion Time               & Continuous           \\ \hline
Mean\_Anomaly                 & Continuous           \\ \hline
Mean\_Motion                  & Continuous           \\ \hline
Hazardous                     & Categorical (Binary)
\end{tabular}
\end{center}
\label{tab_features}
\end{table}

\end{frame}

\section{Prelim. analysis}

\begin{frame}{}
\begin{center}
{\Huge Prelim. analysis}
\end{center}
\end{frame}

\begin{frame}{Density Plot}
\begin{columns}
\column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \centering
    \includegraphics[width=\textwidth]{Pic/DENSITY_Perihelion_Distance.pdf}
    \subcaption{ \begin{center}
    a) Perihelion Distance
    \end{center}}
    \vspace{4ex}
  \end{figure}
\column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \centering
    \includegraphics[width=\textwidth]{Pic/DENSITY_Eccentricity.pdf}
    \subcaption{ \begin{center}
    b) Eccentricity
    \end{center}}
    \vspace{4ex}
  \end{figure}
\end{columns}
\end{frame}

\begin{frame}{Density Plot}
\begin{columns}

\column{0.5\textwidth}
    \begin{figure}[b]{\textwidth}
    \centering
    \includegraphics[width=\textwidth]{Pic/DENSITY_Min_orbit_intersection.pdf}
    \subcaption{ \begin{center}
    c) Min orbit intersection
    \end{center}}
    \vspace{4ex}
  \end{figure}
  \column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \centering
    \includegraphics[width=\textwidth]{Pic/DENSITY_Absolute_magnitude.pdf}
    \subcaption{ \begin{center}
    d) Absolute magnitude
    \end{center}}
    \vspace{4ex}
  \end{figure}
\end{columns}
\end{frame}

\begin{frame}{FAMD }
\begin{columns}

\column{0.5\textwidth}
    \begin{figure}[h]
\begin{center}
\includegraphics[width=1\textwidth]{Pic/FAMD.pdf}
\label{FADM}
\end{center}
\end{figure}
  \column{0.5\textwidth}
 \begin{figure}[h]
\begin{center}
\includegraphics[width=1\textwidth]{Pic/FAMD_Quantitative variables.pdf}
\label{FAMD_Quantitative variables}
\end{center}
\end{figure}
\end{columns}
\begin{center}
Performed with the FactoMineR package \cite{le2008factominer}
\end{center}
\end{frame}

\begin{frame}{Mutual information analysis}
\begin{figure}
\begin{center}
\includegraphics[width=0.8\textwidth]{Pic/Mutual_information.pdf}
\label{Mutual_information}
\end{center}
\end{figure}
\begin{center}
Performed with the varrank package \cite{kratzer2018varrank}
\end{center}
\end{frame}

\section{Probabilistic modelling}

\begin{frame}{}
\begin{center}
{\Huge Probabilistic modelling}
\end{center}
\end{frame}

\begin{frame}{GLASSO}
\begin{columns}
\column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \centering
    \includegraphics[width=\textwidth]{Pic/GLASSO_0.1.pdf}
    \subcaption{$\rho$=0.1 \begin{center}
    \end{center}}
  \end{figure}
  \column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \centering
    \includegraphics[width=\textwidth]{Pic/GLASSO_0.2.pdf}
    \subcaption{$\rho$=0.2 \begin{center}
    \end{center}}
  \end{figure}
\end{columns}
\begin{center}
Performed with the GLASSO package \cite{glasso}
\end{center}
\end{frame}

\begin{frame}{GLASSO}
\begin{columns}
\column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \centering
    \includegraphics[width=\textwidth]{Pic/GLASSO_0.3.pdf}
    \subcaption{$\rho$=0.3 \begin{center}
    \end{center}}
  \end{figure}
  \column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \centering
    \includegraphics[width=\textwidth]{Pic/GLASSO_0.4.pdf}
    \subcaption{$\rho$=0.4 \begin{center}
    \end{center}}
  \end{figure}
\end{columns}
\begin{center}
Performed with the GLASSO package \cite{glasso}
\end{center}
\end{frame}

\begin{frame}{Mixed interactions: mgm}
\begin{figure}[h]
\begin{center}
\includegraphics[width=0.6\textwidth]{Pic/mgm.pdf}
\label{mgm}
\end{center}
\end{figure}
\begin{center}
Performed with the mgm package \cite{haslbeck2015mgm}
\end{center}
\end{frame}

\begin{frame}{Mixed interactions: minforest}
\begin{figure}[h]
\begin{center}
\includegraphics[width=0.6\textwidth]{Pic/minforest.pdf}
\label{mgm}
\end{center}
\end{figure}
\begin{center}
Performed with the gRapHD package \cite{de2009high}
\end{center}
\end{frame}

\begin{frame}{Mixed interactions: mmod}
\begin{figure}[h]
\begin{center}
\includegraphics[width=0.6\textwidth]{Pic/mmod.pdf}
\label{mgm}
\end{center}
\end{figure}
\begin{center}
Performed with the gRim package \cite{grim}
\end{center}
\end{frame}

\begin{frame}{Mixed interactions}
The mgm model is the one that has the list of connection more coherent with the celestial mechanics laws.
\begin{columns}
\column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \includegraphics[width=\textwidth]{Pic/mgm_confusion.pdf}
  \end{figure}
  \column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \includegraphics[width=\textwidth]{Pic/ROC_mgm.pdf}
  \end{figure}
\end{columns}
\end{frame}

\section{Other ML algorithms}

\begin{frame}{}
\begin{center}
{\Huge Other ML algorithms}
\end{center}
\end{frame}

\begin{frame}{Random Forest}
\begin{columns}
\column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \includegraphics[width=\textwidth]{Pic/RF_confusion.pdf}
  \end{figure}
  \column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \includegraphics[width=\textwidth]{Pic/ROC_RF.pdf}
  \end{figure}
\end{columns}
\begin{center}
Performed with the rfor package \cite{rfor}
\end{center}
\end{frame}

\begin{frame}{Random Forest}
  \begin{figure}[b]{\textwidth}
    \includegraphics[width=0.7\textwidth]{Pic/RF_Importance.pdf}
  \end{figure}
\end{frame}

\begin{frame}{Support Vector Machines}
\begin{columns}
\column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \includegraphics[width=\textwidth]{Pic/SVM_confusion.pdf}
  \end{figure}
  \column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \includegraphics[width=\textwidth]{Pic/ROC_SVM.pdf}
  \end{figure}
\end{columns}
\begin{center}
Performed with the e1071 package \cite{dimitriadou2008misc}
\end{center}
\end{frame}

\begin{frame}{Quadratic Discriminant Analysis (QDA)}
\begin{columns}
\column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \includegraphics[width=\textwidth]{Pic/QDA_confusion.pdf}
  \end{figure}
  \column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \includegraphics[width=\textwidth]{Pic/ROC_QDA.pdf}
  \end{figure}
\end{columns}
\begin{center}
Performed with the MASS package \cite{MASS}
\end{center}
\end{frame}

\begin{frame}{Logistic regression}
\begin{columns}
\column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \includegraphics[width=\textwidth]{Pic/Logisic_confusion.pdf}
  \end{figure}
  \column{0.5\textwidth}
  \begin{figure}[b]{\textwidth}
    \includegraphics[width=\textwidth]{Pic/ROC_Logistic.pdf}
  \end{figure}
\end{columns}
\begin{center}
Performed with the stats package \cite{stats}
\end{center}
\end{frame}

\begin{frame}{$\phi$ coefficient}
\begin{table}[]
\caption{$\phi$ coefficient (also known as Matthews correlation coefficient )}
\begin{center}
\begin{tabular}{c|c}
Algorithm & $\phi$ \\ \hline
RF        & 0.9876 \\ \hline
SVM       & 0.7111 \\ \hline
logistic  & 0.6173 \\ \hline
mgm       & 0.5997 \\ \hline
QDA       & 0.5562
\end{tabular}
\end{center}
\label{phi_values}
\end{table}
\end{frame}

\section{Conclusions}

\begin{frame}{}
\begin{center}
{\Huge Conclusions}
\end{center}
\end{frame}

\begin{frame}{Interpretability and scientific validation}

\begin{remark}[Interpretability - Tarski definition]
The formal theory T can be translated into S if and only if S can prove the theorem of T in its language \cite{tarski1953undecidable}
\end{remark}

\end{frame}

\begin{frame}{Interpretability and scientific validation}

\begin{remark}[Scientific method - Einstein definition]
Science uses the totality of the primary concepts, i.e., concepts directly connected with sense experiences, and propositions connecting them. Such a state of affairs cannot, however, satisfy a spirit which is really scientifically minded;\textbf{ because the totality of concepts and relations obtained in this manner is utterly lacking in logical unity}. In order to supplement this deficiency, one invents a system poorer in concepts and relations, a system retaining the primary concepts and relations of the \textit{first layer} as logically derived concepts and relations. \textbf{This new \textit{secondary system} pays for its higher logical unity by having elementary concepts (concepts of the second layer), which are no longer directly connected with complexes of sense experiences} \cite{physics-reality}
\end{remark}

\end{frame}

\begin{frame}{Conclusions: forecast performances vs intepretability}
\begin{itemize}
\item The mgm algorithm is not the best one in terms of performance, but it provides the connections between the features. On the other side, except for the variable importance in RF, the SVM and RF are a black box one
\item The mgm model, as the different graphical model is open to a proper scientific validation, the SVM and the RF not.
\item The probabilistic models lack in the forecast is compensated by their interpretability
\item This is meaningful since interpretability and completeness/accuracy are in conflict
\item It is worth noting that the logistic model, which is highly interpretable, has performances similar to the mgm
\item The probabilistic models provide a good trade-off between interpretability and forecast performances. As long as one is interested in producing a really scientific result, such algorithms as the logistic regression should be considered (e.g if the only aim is the forecast, the RF is better. However, how long one can trust the RF result ?)
\end{itemize}
\end{frame}

\begin{frame}

{\Large \textit{In its efforts to learn as much as possible about nature, modern physics has found that certain things can never be “known” with certainty. Much of our knowledge must always remain uncertain. The most we can know is in terms of probabilities.} Richard P. Feynman (1918-1988)}
\end{frame}

\begin{frame}[t,allowframebreaks]
\frametitle{Bibliography}
\printbibliography
\end{frame}

\end{document}


text:
% Copyright 2019 Markus J. Pflaum, licensed under CC BY-NC-ND 4.0
% main author:
%   Markus J. Pflaum
%
\section{Cauchy filters and completeness}
\label{sec:cauchy-filters-completeness}


text:
\subsection{\soarb{remove-wme}}
\label{remove-wme}
\index{remove-wme}
Manually remove an element from working memory.
\subsubsection*{Synopsis}
remove-wme \emph{timetag}
\end{verbatim}
\subsubsection*{Options}
\hline
\soar{\soar{\soar{ timetag }}} & A positive integer matching the timetag of an existing working memory element.  \\
\hline
\end{tabular}
\subsubsection*{Description}
 The remove-wme command removes the working memory element with the given timetag. This command is provided primarily for use in Soar input functions; although there is no programming enforcement, remove-wme should only be called from registered input functions to delete working memory elements on Soar's input link.
 Beware of weird side effects, including system crashes.
\subsubsection*{Default Aliases}
\hline
\soar{\soar{\soar{ Alias }}} & Maps to  \\
\hline
\soar{\soar{\soar{ rw }}} & remove-wme  \\
\hline
\end{tabular}
\subsubsection*{See Also}
\hyperref[add-wme]{add-wme} \subsubsection*{Warnings}
 remove-wme should never be called from the RHS: if you try to match a wme on the LHS of a production, and then remove the matched wme on the RHS, Soar will crash.
 If used other than by input and output functions interfaced with Soar, this command may have weird side effects (possibly even including system crashes). Removing input wmes or context/impasse wmes may have unexpected side effects. You've been warned.

max_stars_repo_name: sleyzerzon/soar

max_issues_repo_name: sleyzerzon/soar

max_forks_repo_name: sleyzerzon/soar


text:
\section{First Assignment}

	\subsection{Program}
		In order to resolve the Asymmetric Travelling Salesman Problem with the support of CPLEX API I built three files:
		\begin{itemize}
			\item \verb|main|: the file where all other files are linked and combine in order to solve the problem and use CPLEX API;
			\item \verb|dataReader|: in this file the data is read from a file \verb|.dat| given in input at the start of the program;
			\item \verb|ilpSolver|: this file has the responsibility of initialize the environment of CPLEX API with the \verb|setUp| function, in it all the variables and constraints of the mathematical model are initialize. Instead with the \verb|solve| function the program run the CPLEX method for solving a Mixed Integer Programming Problem.
		\end{itemize}