# Performance Evaluation of Classification Algorithms to Detect Bee Swarming Events Using Sound
## 4 k-NN, SVM, and U-Net CNN Algorithms Evaluation
### Experimental Scenario  
The authors' evaluation scenario included five hives with a population capacity of 10 frames and a queen age range of 1 to 2 years (Table 2). The IoT device was placed to record the sound produced by the beehives. In the location where the experiment took place, spring flowering had not yet begun. However, when flowering started in the area, the bee swarms started collecting pollen and nectar, resulting in daily exponential growth. Sound recording for each swarm was performed twice every 24 h from the day the equipment was placed until the day of swarming. More specifically, for each day, a 12-h audio recording was carried out as follows:  
* Night activity: 00:00-06:00 (6 h recordings)
* Daily activity: 10:00-16:00 (6 h of recordings)  
All beehives (2-5) developed swarming events, with the first event beginning at the end of the spring bloom. After two swarming events, the beehive was replaced with another of similar characteristics under the same stressful conditions. This resulted in 4 out of 5 almost concurrent swarming events and a total of 12 swarming events for the whole season (2-3 per Beehive ID), as presented in Table 3.  
In order not to overlap the \"fluttering\" of the bees with the fact of their flight, due to usual everyday activity, only the sounds of their night activity were used in the sound analysis methods. Consequently, 6 h of audio was used from each beehive. Even though the day of swarming was unknown, the continual observation of the hives, with the assistance of professional apiarists, provided us with the appropriate feedback information. The research presented in this paper took place in Ioannina, Greece, from March to July 2022 (five months). Therefore, the experiment was performed during the swarming season. The experiment site was located at the University of Ioannina beekeeping station located in the area of Ligopsa, Ioannina, Greece. Five beehive IoT monitoring devices have been implemented for this purpose. Moreover, the authors performed daily checks on the beehives' conditions with a professional beekeeper's assistance, indicating probable swarming events (formation of queen cells). The experiment site was 30 km from Ioannina city, where urban noises during the day could not add noise to the experiment altering the results. The recorded data of 6 h were cropped into 360 single-minute audio files. Next, according to the apiarists' observations, all audio files were annotated into swarming data \begin{table}
\begin{tabular}{c c} \hline \hline
**Bee Colony Hive ID** & **Age of Queen Bee** \\ \hline
1 & 1 year old/non-stressed \\
3 & 2 years old/stressed * \\
4 & 2 years old/stressed * \\
5 & 2 years old/stressed * \\ \hline \hline \end{tabular}  
* Beehive stressing conditions include using 10-frame fully populated beehives that are kept with no feeding and under the sun in extreme moisture conditions with closed ventilation holes, amplified with the use of a nylon sheet placed between the lid and the brood box.  
\end{table} 
Table 2: Age of the queen bee in different hives of the experiment. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Bee Colony Hive ID** & **First Swarming Date** & **Number of Swarming Events** \\ \hline
1 & Non-Swarming & 0 \\
2 & 8 May 2022 & 4 \\
3 & 24 May 2022 & 2 \\
4 & 13 May 2022 & 3 \\
5 & 17 May 2022 & 3 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Swarming date in the different hives of the experiments. up to 10 days before the swarming event. Additionally, all sounds up to 20 days before swarming were converted into non-swarming data. Finally, every single-minute audio file was classified into one of the above classes creating a total of 23,760 single-minute.wav audio files for the experimentation procedure. Although the authors' evaluation was performed using a limited number of IoT devices (five in total), with the help of the beekeepers, these five hives were selected and stressed to force swarming so the aims of the paper could be achieved.