\begin{kasten}
  \large{
  \bi
\item For each test instance, select \textit{k} analogies from training.
\bi
\item While selecting analogies, use a similarity measure: ABE0 uses the Euclidean distance.
\begin{equation}\label{equ:euclid}\small
Distance = \sqrt{\sum_{i=1}^{n}{(x_{i} - y_{i})^{2}}}
\end{equation}
\item Before calculating similarity, apply a scaling measure on features: ABE0 normalizes to 0-1 interval.
\ei
\item Adapt \textit{k} nearest analogies to calculate an effort estimate: ABE0 takes median of these values.
\ei
  }
\end{kasten}

\begin{kasten}
  \section*{ \hspace{0.1cm} {\color{red} \underline{DETAILS OF RELEVANCY FILTERING}}}
  \large{
  
  Our relevancy filter  is a small variant of ABE0. It is a two-pass system.
Pass 1 removes  the training instances implicated in poor decisions;
pass 2 selects those instances nearest the test instance.

\vspace{3 mm}
   The leaves of the remaining sub-trees are the {\em survivors} of pass one.
These move to pass 2 where the
survivors are used to build a second binary tree
(called BT2).  BT2 is generated and traversed by test instances
in the same fashion as
BT1.  This time, while traversing the tree, instead of storing the
variances of sub-trees, we use the variance as a decision criterion.
If the variance of the current tree is larger than its sub-trees,
then continue to move down the subtree; otherwise, stop moving and
select the instances in the current tree as the relevant instances
and adapt them for estimation.  

	\vspace{3 mm}
	This filter is similar to the NN-filter
used by Turhan et.al.\cite{Turhan2009}, except that there is no
need to pre-specify the number of analogies $k$ to be used for estimation.
Each
test instance selects its own relevant analogies by traversing
to different sub-trees of BT2.
For a detailed discussion on the rationale behind this filter, see~\cite{koc10}.
All we need to say here is that this filter is known to
generate low errors for ABE0-style effort
estimation~\cite{koc10}. Hence, it is a suitable tool for the rest of this study.

\vspace{4 mm}
    \begin{minipage}{13cm}
    \center
      \includegraphics[width=9cm]{filtering1.eps}
    \end{minipage}

\vspace{3 mm}
Each tree BT1 and BT2 are binary cluster trees.
The red sub-tree is pruned in pass one due to high variance. 
 The remaining subtrees (shown in
green) form the right-hand tree.

   In pass two, test instances
start at the root of this tree and traverse to the nearest child (and so on, recursively).
While the sub-tree variance continues to decrease, the traversal continues.
Estimates are generated from the median of the instances of the right-hand-side
sub-tree with lowest variance.



    
    \vspace{1em}
    }
\end{kasten}
