\input{figures/pseudo-code/burak.tex}
The Burak filter was designed to aid in Cross Company defect
prediction. As noted by Turhan et al., when Cross Company data was
used in defect prediction, the recall and false alarm rates both
increased drastically\cite{08Turhan}. They determined that this
was caused by the increase in defective examples, both pertinent and
extraneous. A median sized dataset contains approximately 450 instances, or modules, while the combined cross company dataset contains 3600 modules. In order to remove the extraneous examples from a Cross Company dataset, and trim it down to close to the size of a within company training dataset, the training data is
filtered with respect to the testing data.

The Burak filter used the Euclidean distance between the testing and
training examples to find the k nearest neighbors per test
instance. The nearest neighbors for each test instance are combined to
form the training set. Menzies et al.\cite{08ceiling} described the Burak filter as:
\begin{quote}"The union of the 10 nearest neighbors within $D - D_i$."\end{quote}

Any training instances that are within the k
nearest neighbors of more than one test instance are only included
once in the final training set. By training on only the nearest
neighbors to the test instances, theoretically only the relevant
training instances are examined.

The cost associated with generating this nearest neighbor information
is exponential, in the order of $O(N_{train}N_{test})$. For large
datasets, this preprocessing runtime is impractical as the neighbor
information must be recalculated for each testing example. Clump
is proposed as an alternative to to Burak filter.

\subsection{Burak Versus Standard Clustering Methods}
The Burak filter\cite{08Turhan} is used as a clustering
algorithm designed to aid a classifier. The Burak filter finds the k
nearest neighbors, based on Euclidean distance, to each testing
instance. This information is then passed to a classifier for final
classification. Like the Burak filter, clustering algorithms find the nearest neighbors. Standard clustering algorithms create the clusters once, and assign testing instances to the different, pre-created, clusters. The Burak filter creates just one cluster for each testing instance, and then merges the clusters into one cluster for training and classification.
