\documentclass[12pt,a4paper,titlepage]{article}
\usepackage{amsmath}
\usepackage{listings}
\usepackage{url}
\usepackage{graphicx}
%\usepackage{wrapfig}
\usepackage{listings}
\usepackage{color}
\setcounter{tocdepth}{5}
\usepackage{alltt}
\usepackage{makeidx}
\usepackage{textcomp}
\lstset{%
   basicstyle=\footnotesize\tt,%numbers=left,%   numberstyle=\tiny,% stepnumber=2,%%
   upquote=true,%
   framexleftmargin=1mm, frame=shadowbox, rulesepcolor=\color{black}}
\title{GUI Model}
\author{Matthew Bartenshlag, Peter Santiago}
\newcommand{\codelist}[2]{\begin{figure}%
           \index{files!#1}\lstinputlisting{#2}\caption{CODE: {\tt #1}}%
           \label{fig:#1}\end{figure}}
\begin{document}
\maketitle
\section{Defmodel Code}
\codelist{defmodelcode1}{model1.lisp}
\codelist{defmodelcode2}{model2.lisp}
\codelist{defmodelcode3}{model25.lisp}
\codelist{defmodelcode4}{model3.lisp}
Matt will provide an explaination here at some point once the code is finalized. 
See Figures \ref{fig:defmodelcode1}, \ref{fig:defmodelcode2}, \ref{fig:defmodelcode3}, and \ref{fig:defmodelcode4} for code.
\clearpage
\subsection{Using Real-World Data}
Real-world data can be used in our model to inform the user (or the underlying model programming) of slider choices which are represented in our knowledge base. Slider choices which are more likely than others to occur in the real world have a changed slider color when such a choice has been made. Knowledge of real-world data is maintained through simple frequency counts -- this allows for very simply and quick calculations to be performed.
\subsection{Using Model-Generated Data}
Model-generated data are created and interpreted when the user presses the 'Important' button. The data are interpreted using a support-based Bayesian Ranking.

1. Several thousand samples of data to be passed to the model are generated.

2. These samples are run through the model, and their results are generated.

2. The ranges for attributes of the samples are binned using an equal frequency binning algorithm.

3. These samples are then classified into the $best$ (currently 10\% highest) and $rest$.

4. Each range for each attribute is then ranked according to the following algorithm:

\begin{equation}
P(best|E) * support(best|E) = \frac{like(best|E)^2}{like(best|E) + like(rest|E)} \label{1}
\end{equation}
where
\begin{equation}
like(best|E) = freq(E|best) * P(best) \label{2}
\end{equation}
\begin{equation}
like(rest|E) = freq(E|rest) * P(rest) \label{3}
\end{equation}

\clearpage
\section{Evett Model} 
\codelist{defmodelevett}{defmodelevett.lisp}
\begin{figure}
\centering
\includegraphics[width=.85\textwidth]{evett.png}
\caption{Evett GUI}
\label{evettgui}
\end{figure}
I'll have to get matt to add a description here someday. 
See Figure \ref{fig:defmodelevett} for code. 
A sample gui image is located in Figure \ref{evettgui}.

\clearpage
\section{Seheult Model}
\codelist{defmodelseheult1}{defmodelseheult1.lisp}
\codelist{defmodelseheult2}{defmodelseheult2.lisp}
\begin{figure}
\centering
\includegraphics[width=.85\textwidth]{seheult.png}
\caption{Seheult GUI}
\label{seheultgui}
\end{figure}
The final section of the defmodel pertaining to the generation of three-dimensional graphs has been heavily modified. This model implements the Seheult algorithm as described in (insert section reference once this is combined with the full document).  
See Figures \ref{fig:defmodelseheult1}, \ref{fig:defmodelseheult2} for code. 
A sample gui image is located in Figure \ref{seheultgui}.

\clearpage
\section{Grove Model}
\codelist{defmodelgrove1}{defmodelgrove1.lisp}
\codelist{defmodelgrove2}{defmodelgrove2.lisp}
\begin{figure}
\centering
\includegraphics[width=.85\textwidth]{grove.png}
\caption{Grove GUI}
\label{grovegui}
\end{figure}
The final section of the defmodel pertaining to the generation of three-dimensional graphs has been heavily modified. This model implements the Grove algorithm as described in (insert section reference once this is combined with the full document).  
See Figures \ref{fig:defmodelgrove1}, \ref{fig:defmodelgrove2} for code. 
A sample gui image is located in Figure \ref{grovegui}.
\end{document}
