\begin{table}
\center
\caption{Observations of Grades and Behavior Data of Students}
\begin{tabular}{|c|c|c|c|c|c|} \hline
Student&Sleep&Study&Video Games&Exercise&Grade\\ \hline
1&Much&Every day&Some&Some&A\\ \hline
2&Little&Before Test&None&Little&B\\ \hline
3&Average&Every day&None&None&A\\ \hline
4&Average&None&Much&Little&C\\ \hline
5&Average&Before Test&Some&Some&C\\ \hline
6&Much&Before Test&None&Some&A\\ \hline
7&Much&Little&None&Some&B\\ \hline
8&Average&None&Much&None&D\\ \hline
9&Little&None&Much&Little&D\\ \hline
10&Little&Every day&Much&None&B\\ \hline
11&Average&Every day&None&Much&A\\ \hline
12&Average&Little&Some&Some&C\\ \hline
13&Little&Little&None&Much&C\\ \hline
14&Little&Every day&Much&Much&A\\ \hline
15&Little&None&Some&Some&D\\ \hline
16&Little&Little&Much&None&C\\ \hline
17&Average&Little&None&Much&D\\ \hline
18&Average&Before Test&Some&None&B\\ \hline
19&Average&Before Test&None&Some&B\\ \hline
20&Little&Little&Some&Some&D\\ \hline
 

\end{tabular}
\label{gradesTable}
\end{table}
\subsubsection{Contrast Set Learning with Tar2}

The data in Table \ref{gradesTable} gives a hypothetical report of an observation of the behavior of 20 students, and their grades.  The problem is to learn from this model behaviors that are likely to lead to success as measured in course grades.  We want to mine this data by searching for patterns of behavior that are successful ones.  Here we consider two separate \emph{treatments} form the data from this table, both of which have the effect of producing good grades.  \\ 

Treatment \#1: study = ``Every Day" \par
Treatment \#2: study = ``Before Test" $\wedge$ \par Video Games = ``None" $\wedge $ Exercise = ``Some" \par

The application of Treatment \#1 results in then selection of 5 rows of data: four resulting in a grade of A and 1 resulting in a grade of B.  Treatment \#2 selects 2 rows, one resulting in A, one in a B grade.  To calculate the \emph{lift} of each of these, we first calculate the \emph{baseline} value that includes all of the data.  We assign the typical grade point averages to these grades: A = 4.0, B = 3.0, C = 2.0, D = 1.0.  (There is no reason that we are constrained to these particular values except by convention.  In fact, the treatment learning algorithm would work better if we assigned much higher values to the desired outcome values.)  Note that, in the data of Table \ref{gradesTable}, there are 5 rows with each grade. Here is the baseline calculation: \\
$value(baseline) = \frac{\frac{5}{20}*4.0 + \frac{5}{20}*3.0 + \frac{5}{20}*2.0 + \frac{5}{20}*1.0} {4.0 + 3.0 + 2.0 + 1.0} = 0.25$ \\
For Treatment \#1, we first calculate the weighted value of that treatment, then the \emph{lift} which is the ration of this treatment's weighted value to that of the baseline. \\
$value( study = ``Every Day" )\\ =  \frac{\frac{4}{20}*4.0 + \frac{1}{20}*3.0 + \frac{0}{20}*2.0 + \frac{0}{20}*1.0} {4.0 + 3.0 + 2.0 + 1.0} = \frac{19}{50} = 0.38$\\
$Lift(study = ``Every Day" ) = 0.38 / 0.25 = 1.52$\\

For Treatment \#2, the analogous calculations are as follows:
value( study  =  ``Before Test"  $\wedge$ Video Games = ``None" $\wedge $ Exercise = ``Some" )\\ =  $\frac{\frac{1}{20}*4.0 + \frac{1}{20}*3.0 + \frac{0}{20}*2.0 + \frac{0}{20}*1.0} {4.0 + 3.0 + 2.0 + 1.0} = \frac{7}{20} = 0.35$\\ \\
Lift( study = ``Before Test" $\wedge$ Video Games = ``None" \\ $\wedge $ Exercise = ``Some" ) =  0.38 / 0.25 = 1.40\\

Thus, both treatments appear to have a positive effect.  However, our intuition tells us that Treatment \#1 is much better than Treatment \#2 since it is much simpler.  Tar2 incorporates this intuition through its requirement for \emph{minimum best support}.   

