\input{figures/pseudo-code/naivebayes.tex}
Naive Bayes\cite{NB} makes many assumptions about data. All attributes are:
\bi
\item assumed to be equally important.
\item statistically independent.
\item do not predict values of other attributes
\ei
These assumptions rarely hold up to real world data, but empirically,
they work quite well\cite{domingos97}. Naive Bayes is frequently
augmented by different pre and post processing algorithms to attempt
to reduce the its naivety while still maintaining its performance and
runtime.

Naive Bayes runs in $O(nk)$ time, where $n$ is the number of instances, and $k$ is the number of columns. Naive Bayes is able to achieve this runtime by creating no structure, no rule, and no complex processing; Only frequency statistics
are gathered during training, followed by simple arithmetic during
testing. Missing values are handled by ignoring that attribute during
calculations. The major drawback to Naive Bayes is that, although Naive
Bayes offers conclusions, it offers little insight into how these
conclusions are reached\cite{visualizeNB}. This makes Naive Bayes hard to use in some business situations where explanations about decisions are necessary.
