## 3 ML Architectures and Results
### ANN-KNN Classifier  
Here, we shall consider the intermediate set of attributes analyzed in the previous section, namely the MMEs \(M_{01}\), \(M_{02}\), \(M_{10}\)\(M_{11}\), \(M_{12}\), \(M_{20}\), \(M_{21}\), \(M_{22}\) plus AoI, which can be a compromise between the accuracy and technological cost because it does not involve circular polarizations. We will show that the ML algorithm based on ANNs can be improved by combining it with the KNN algorithm.  
Suppose that the optimized ANN has been generated from the training set by employing the Matlab **fitcnet** function. We define seven clusters, one for each class obtained by applying the trained ANN to all samples in the training DB. Notice that, in reality, some of the samples in the same cluster were misclassified and belong to a different class (see Figure 7, left panel). Then, for each of these clusters, a KNN classifier is built (the best value of K is chosen by using Matlab function **fitckn**), which enables us to discriminate some of the misclassified objects because the true class of each object in the training DB is known (see Figure 7, central panel). So, there are at least some clusters for which the KNN reclassifies some of the misclassified samples (while the majority have been classified correctly by the ANN).  
At the testing stage, each new event is an input for the ANN classifier. It falls in a cluster from 1 to 7. Then, the KNN classifier for that cluster is activated and the event is reclassified. It can retain the same classification or may change it. This correcting procedure of the classification is achieved. This methodology acts as a predictor corrector classifier, for which the ANN acts as a predictor and the KNN as a corrector.  
The ANN-KNN classifier does improve the results obtained with the intermediate set of attributes, as can be seen from the confusion table shown in the right panel of Figure 7. The overall classification accuracy obtained raises to 91.4% if the angle of incidence is included. This represented an improvement of 0.4% is the accuracy rate, but it meant 4.4% less misclassifications.  
It can be seen from the diagonal entries of the confusion table in Figure 7 that the most \"problematic\" classes are 4, 5, and 7. In order to remediate it, we considered another ML architecture with four additional attributes, which are internal products of the attribute vector of the sample, \(\vec{x}\), with the average attribute vectors of class 3 (clothes) and the three problematic classes, \(<\vec{x}>_{i},\ i=3,\) 4, 5, 7 (the internal product involves only MMEs, not the AoI entry). These additional attributes are expected to emphasize the difference between these classes and they come without additional measurement cost.  
We applied this algorithm to the same set of eight MMEs considered in this section, which yielded a total of 13 attributes. With the ANN-KNN approach, the accuracy of the classification results improved further, reaching 92.6% (see Figure 8). Although it is not as good as if we considered as attributes all 15 MMEs plus AoI, this ML architecture provides a very good overall accuracy rate at a considerably lower technological cost.  
Figure 7: ML architecture based on ANN + KNN (**left** and **center**) and its confusion table (**right panel**) where the attributes used are the same 8 MMEs as in Figure 5 plus the AoI (**right**).