## 3 Results and Discussion
### Performance Evaluation of Binary Classification
In contrast with other classical feature selection algorithms, the developed algorithm achieved better classification accuracy and F1-score. The tabulated classification parameters in Table 1 have shown that the developed MLPW-SR feature selection algorithm selected the best feature spectra set compared to the RF, IG, AdaBoost, mRMR, Chi2, ANOVA, and Relief algorithms, achieving a higher classification and F1-score. The classification accuracy of the selected feature spectra for different feature selection algorithms is also illustrated in Figure 2 for dataset 1. For dataset 2, the developed MLPW-SR spectral band selection algorithm for 4, 10, and full spectra achieved 88.17%, 90.32%, and 93.82% for raw data and 95.16%, 89.25% and 90.59% for SNV-processed data, respectively. The algorithm-selected 4 and 10 spectra sets were 65, 141, 150, 208 and 4, 65, 125, 129, 138, 141, 143, 150, 170, 208 for raw data and 9, 91, 118, 171 and 41, 57, 64, 65, 91, 96, 106, 117, 120, 190 for SNV-processed data. The developed algorithm achieved comparable results for 4 and 10 spectra for both raw and pre-processed data. Compared with the other existing feature spectra selection algorithms, the developed algorithm achieved better results except in a few instances. The performance comparison of different feature spectra selection algorithms for dataset 2 is illustrated in Figure 3.  
Figure 3: Illustration of binary aflatoxin B1 classification accuracy comparison for dataset 2. (**a**) Raw data, (**b**) SNV pre-processed data. Figure 2: Illustration of binary aflatoxin B1 classification accuracy comparison for dataset 1. (**a**) Raw data, (**b**) SNV pre-processed data. For raw data, among the different feature spectra selection algorithms, only the developed MLPW-SR algorithm achieved a higher than 88% classification accuracy for 4 spectra. Similarly, for 10 spectra, the algorithm achieved the highest classification accuracy of 90.32%. In comparison to SNV data, the MLPW-SR achieved the highest classification accuracy for 4 spectra compared to all different feature spectra selection algorithms, including the full spectrum accuracy. This is because MLPW-SR successfully finds the best 4 spectra set, which is also the most relevant set to classify aflatoxin B1. On the other hand, SNV with 10 spectra model achieved lower classification accuracy than the 4 spectra model. This could be because the addition of more spectra with the less relevant spectra made the spectra set less relevant. Therefore, the MLPW-SR algorithm achieved less classification accuracy than RF (90.32%), AdaBoost (91.94%), mRMR (94.62%), and Relieff (91.94%). However, it achieved higher classification accuracy than IG (83.26%), Chi2 (87.63%), and ANOVA (88.98%). For dataset 3, the classification accuracy for 4, 10, and full spectra achieved 85.24%, 87.50%, and 90.06% for raw data and 86.75%, 89.55%, and 87.05% for SNV-processed data, respectively. The developed MLPW-SR demonstrates superior aflatoxin B1 classification accuracy for 4 spectra for raw and SNV data, respectively, compared to other feature spectra selection algorithms. Notably, AdaBoost achieved an accuracy of 87.05% for SNV 4 spectra. Furthermore, MLPW-SR attained a higher classification accuracy for raw and SNV data of 10 spectra, surpassing other feature selection algorithms and aligning closely with the accuracy obtained using the full spectrum. The classification accuracy of selected spectra for raw and SNV-processed data for dataset 3 is visualized in Figure 4. Dataset 3 represents the actual variation in naturally found almond samples; therefore, the overall classification accuracy is less than other datasets. Classical feature selection methods like Chi2, IG, RF, AdaBoost, MRMR, ANOVA, and Relieff have limitations in capturing complex, non-linear interactions between features. These methods often focus on individual feature ranking or subsets, potentially missing interactions between features that could enhance model performance [31].