# Training Spiking Neural Networks with Metaheuristic Algorithms
## 5 Discussion  
The performance of the metaheuristic-based supervised learning was evaluated on five datasets provided by the UCI Machine Learning Repository: Pima Indians Diabetes (Diabetes), Iris Plant, Breast Cancer, Wine, and Liver. The population size and the number of iterations for all datasets were set to 100 and 20, respectively. We investigated the performance of seven meta-heuristic algorithms named the Cuckoo Search Algorithm, Genetic Algorithm, Differential Evolution, Harmony Search, Particle Swarm Optimization, Grammatical Evolution, and Artificial Bee Colony as training algorithms for SNNs. We employed a relative approach to estimate target firing times instead of defining a predefined target firing time. According to the learning curve in Figure 6, it can be observed that all algorithms converged to the optimal solution; however, the CS algorithm showed a faster convergence rate, particularly for the four datasets Iris, Cancer, Wine, and Diabetes. After only six iterations, the CS algorithm converged to the optimal solution. For liver classification, the DE algorithm had a faster convergence rate after only six iterations. The trained network was then tested on the test dataset. Figure 7 shows the training and testing results of UCI datasets among all metaheuristic designs. Based on the classification accuracy achieved by the seven metaheuristic algorithms, it is evident that all of the algorithms gave comparable performances. For the Iris dataset, the classification accuracy of CS was the highest; the training and testing classification accuracies were 99.31% and 98.58%, respectively. In contrast, GE achieved the lowest classification accuracy; training and testing accuracies were 95.76% and 94.67%, respectively. For the Cancer dataset, the classification accuracy of CS on the training and testing sets was 98.87% and 97.68%, which results were superior to those for the other algorithms. For the Liver dataset, the classification accuracy of GA on the training and testing sets was 69.97% and 68.12%--higher than CS and PSO, but lower than DE. For the Wine and Diabetes datasets, CS achieved much better accuracy than the other algorithms. Figure 6: The training curve of the proposed algorithm on seven datasets, including (**a**) Iris(**b**) Cancer, (**c**) Diabetes, (**d**) Liver, and (**e**) Wine. The red line indicates the learning curve of GA, the blue line that of DE, the green line that of PSO, the orange line that of SC, the purple line that of Harmony Search, the black line that of GE, and the brown line that of ABC. Figure 7: _Cont._  
Furthermore, in order to validate the efficiency of the proposed algorithm, five experiments were performed, and the quantitative results were compared with other supervised learning algorithms using multilayer feedforward SNNs. In Table 3, the various models for developing supervised SNNs are compared in terms of learning type and approaches, spiking neuron models, encoding methods, and accuracy based on the five datasets: Pima Indians Diabetes (Diabetes), Iris Plant, Breast Cancer Wisconsin, Wine, and Liver. The gradient descent algorithm SpikeProp [65], Enhanced-Mussels Wandering Optimization (E-MWO) [66], SpikeTemp [67], Growing-Pruning (GP) [68], and multi-SNN with Long-Term Memory SRM [69] were chosen for comparison. Table 4 shows that the proposed model outperformed the other algorithms in terms of classification accuracy. The suggested approach achieved optimal results on four classification test datasets. As shown by the simulation results in Table 4, for the Iris dataset, the classification accuracy of our proposed model was 98.58%, which was higher than for all the other models. Close to our result, the multi-SNN with Long-Term Memory SRM had an accuracy of 97.2%. For the Breast Cancer dataset, the classification accuracy of the proposed algorithm was 97.68%.