\section{Classifiers benchmark}

\subsection{Classifiers efficiency}

\subsubsection{Majority, Random and KNN classifiers}

The objective of this test is to figure out the efficiency of the following algorithms:
\begin{itemize}
  \item[\textbullet] Random classifier.
  \item[\textbullet] Majority classifier.
  \item[\textbullet] KNN with $K$ worthing 3, 5, 10, 50, 100 and 1000 (dataset size).
\end{itemize}
We experimented them using a donut with 1000 elements and 10\% of noise.

\begin{figure}[!h]
	\begin{center}
		\includegraphics[width=12cm]{images/kcross-donut}
	\end{center}
	\caption{Results of KNN on a donut with different K parameters in KNN}
\end{figure}

Random classifier as 50\% of efficiency, which is normal as there is two labels in the donut.\par
Majority classifier is a bit above 55\% of efficiency, as we can imagine that the distribution of points has the same ratio of labels.\par

In this test, 5NN is giving the best results in the KNN family of algorithms, but the results are close with 3 and 10NN. With $K$ over 10 the results is slowly decreasing, and therefore there is no need to use a value higher than 10. The more $K$ is high, the more the cost of the algorithm is important.\par
When $K$ is equal to the size of the dataset (1000), the results are exactly the same as Majority: for each point, we are counting all the points of the dataset.

\subsubsection{WKNN}

The objective of this test is to figure out the efficiency of W5NN with the following weight functions:
\begin{itemize}
  \item[\textbullet] Constant function.
  \item[\textbullet] Gaussian function.
  \item[\textbullet] Triangular function.
\end{itemize}
We experimented them using a donut with 1000 elements and 10\% of noise.

\begin{figure}[!h]
	\begin{center}
		\includegraphics[width=12cm]{images/kcross-weight-donut}
	\end{center}
	\caption{Results of WKNN on a donut with different weight functions}
\end{figure}

The usage of the gaussian function slightly increases the percentage of good classification. The triangular function has a negative impact on KNN results.


\newpage
\subsection{Decision Functions}

A decision function is a map of the domain with its degree of accuracy. Each point of the grid is represented with a color. 
A pure color means that all the nearest points have the same labels. It goes darker with the amount of different labels.

\begin{figure}[!h]
	\begin{center}
		\includegraphics[width=16cm]{images/decision}
	\end{center}
	\caption{Decision functions with 10NN and Step = 1}
\end{figure}

On the edges of the donut, the decision function shows that the result will be less accurate. With a cleaned donut, there is less doubt about the classification in the flat areas, but it does not affect edges.
