# Kernel Learning by Spectral Representation and Gaussian Mixtures
## 4 Experiments
### Classification  
The first dataset is the XOR problem in 2D. We set the number of samples to \(N=6000\). After five swaps with 300 frequencies (\(M\)), the proposal got an AUC of 0.98. The result of this experiment is shown in Figure 1.  
Figure 1: The XOR problem with the probability of belonging to class 1 (orange). If the probability is more than 0.5, then the sample belongs to class 1 otherwise belongs to class 2.  
All the results of the GaBaSR algorithm uses 500 samples (\(M\)) and 5 swaps each one. For classification problem we use some small datasets, Breast Cancer, Credit-g, Blood, Transfusion, Electricity, Egg-eye-state and Kr vs Kp. The breast cancer dataset it comes from the UCI repository [26] dataset, this dataset is the breast cancer wisconsin dataset. The Credit-g dataset comes from the UCI repository [26] and classifies people by a set of attributes as good or bad credit risk. The Electricity Dataset we downloaded from openml.org and contains data from the Australian New South Wales. Dataset egg-eye-state we downloaded from UCI, this describes if the eye is closed (1) or open (0). Kr Vs Kp dataset was downloaded from UCI, is the King Rook vs King Pawn and it's from the King+Rook's side to move and the classification is see if win or not win.  
Tables 1-3 show the results when we try to solve the problem using perceptron, SVM and GaBaSR, respectively. From those tables, we can see that the in the problems of Kr vs. Kp and Electricity GaBaSR has \"similar\" AUC to SVM but it is important to notice that in blood transfusion GaBaSR performs better than the perceptron and SVM.  
In other words, if we compare Table 3 with Table 2, it is possible to observe that the results, in general, for SVM Classification are better than for GaBaSR Classification. AUC equal to 0.5 indicates that the classifier is random, so it does not fulfil its function. Comparing Table 3 with Table 2, we can conclude that SVM Classification works properly for all tested datasets except Blood Transfusion, and GaBaSR Classification works properly only for Kr vs. Kp and Electricity. Results for Blood Transfusion obtained by GaBaSR are better than for SVM but still not satisfactory. A bad result is also a result that has its value.  
In general we had a good accuracy, in most of the cases we had an accuracy above 0.8. For example in the dataset for the breast cancer, we had an accuracy of 0.89, which in general is a good accuracy. In the dataset credit-g we had 0.91 of accuracy using only 500 frequencies in 5 swaps.  
\begin{table}
\begin{tabular}{c c c c c} \hline
**Dataset** & **N** & **M** & **Swaps** & **AUC** \\ \hline Breast Cancer & & & & \\
[26] & 569 & 500 & 5 & 0.96480 \\ Credit-g [26] & 1000 & 500 & 5 & 0.44576 \\ Blood & 748 & 500 & 5 & 0.37572 \\ Transfusion [27] & 45,312 & 500 & 5 & 0.68576 \\ Electricity [28] & 14,980 & 500 & 5 & 0.61635 \\ Egg-eye-state [26] & 3196 & 500 & 5 & 0.99357 \\ Kr vs Kp [26] & 3196 & 500 & 5 & 0.99357 \\ \hline \end{tabular}
\end{table}
Table 1: Results of the Perceptron.  
\begin{table}
\begin{tabular}{c c c c c} \hline
**Dataset** & **N** & **M** & **Swaps** & **AUC** \\ \hline Breast Cancer & & & & \\
[26] & 569 & 500 & 5 & 0.934656 \\ Credit-g [26] & 1000 & 500 & 5 & 0.85282 \\ Blood & 748 & 500 & 5 & 0 \\ Transfusion [27] & 45,312 & 500 & 5 & 0.76076 \\ Electricity [28] & 14,980 & 500 & 5 & 0.692924 \\ Kr vs Kp [26] & 3196 & 500 & 5 & 0.96970 \\ \hline \end{tabular}
\end{table}
Table 2: Results SVM Classification.