1. Introduction
The nest of a bee colony is extremely aromatic. The smell emanating from the hive is quite pleasant to the human nose and is often associated with the scent of honey. Beekeepers tending to bee colonies greatly appreciate the smell of the hive’s air, as it has a soothing effect on the nervous system, relieves stress, and can be somewhat addictive. Because of this, many beekeepers continue to operate their apiaries into old age, and only the loss of physical fitness causes them to retire from beekeeping. Hive air has been used successfully in the treatment of respiratory diseases [
1].
The scent emitted from a bee colony is created by a mixture of various volatile organic compounds released by the components of the nest. Its primary structure is the bee combs made of beeswax produced by the wax glands of worker bees. In the case of freshly built combs, it is the smell of this substance that predominates [
2]. About 20 volatile substances, mainly belonging to alkanes, are responsible for this aroma. The most dominant compounds are 2,4-dimethyl-heptane, acetal, nonanal, and 4-methyl-octane [
3].
Bee combs are made up of hexagonal cells in which bees store food in the form of honey and bee bread. The honeys produced by bees and stored in the cells of combs are particularly rich in various essential oils, phenols, alcohols, carboxylic acids, aldehydes, ketones, hydrocarbons, and polyphenols. About 80 aromatic substances have been identified in honey [
4]. Their presence and ratio determine the organoleptic properties of honey. The predominant aromatic compounds in honey are benzaldehyde, furfural, and linalool [
3]. Twenty-nine aromatic substances have been determined in bee bread, of which 24 are sulfides (dimethylsulfide, dimethyldisulfide, and dimethyltrisulfide).
Also, the queen lays eggs into the bee cells, which give rise to larvae and then pupae. All developmental forms of bees are called bee brood. The first 9 days of development of worker bees take place in open cells, in which case we speak of open brood, and the next 12 days are in cells closed with wax, in which case we speak of sealed brood. Bee brood is one of the components of a bee colony. Both open bee brood and sealed brood secrete a complex of substances called brood pheromones [
5]. The composition of this signaling complex has been shown to be a mixture of 10 methyl or ethyl esters of higher C16 and C18 fatty acids (palmitic, stearic, oleic, linolenic, and linoleic) [
6]. They are formed in the salivary glands of larvae and persist on the surface of the larvae’s cuticles [
7]. These substances are non-volatile and often perishable, as they are quickly oxidized. The brood pheromone can have different compositions and combinations of esters, and this depends on what function it performs [
8,
9,
10]. Additional odor components of open brood are larvae feces as well as royal jelly [
11,
12], in which 1–3 day-old larvae are immersed [
7,
13]. In the case of sealed brood, an additional odor element will be the wax capping.
Bee cells are covered by worker bees with a thin layer of propolis before the queen bee lays her eggs into them. The more generations of bee brood are raised in a comb, the more layers of propolis are found in its cells, which affects the thickness of the cell walls as well as the aroma of the comb. Propolis, otherwise known as bee putty, is the chemically richest bee product. It contains about 350 substances, but its composition is never identical. Most of its substances are resins (50–80%), and essential oils account for 4–15% of the products [
14,
15,
16,
17,
18]. Thus, older slices are enriched with aroma components of the mentioned elements [
18,
19,
20,
21], which can significantly differentiate the odors of freshly built patches from old patches.
Apiary management requires constant inspections of bee colonies to determine their status and condition. Sometimes, weather conditions do not allow the opening of a bee nest, or the beekeeper lacks the time and opportunity to get to the apiary. This could be helped by semiconductor gas sensors that could conduct analysis of volatile odorous substances released from the nest and thus inform the beekeeper of the situation in the apiary, therefore streamlining work and reducing the cost of running the apiary. Air quality measurements using semiconductor gas sensors are already being carried out in many industries [
22,
23,
24]. Excellent results were obtained in the detection of bee and brood diseases and the status of worker bees [
25,
26,
27,
28]. A particular application is FIGARO’s TGS series of sensors. The measuring element in these sensors is an electrode made of tin dioxide (SnO
). The working temperature of SnO
-based semiconductor sensors is 300–450 °C [
29]. As a result of the contact of this semiconductor with volatile organic substances, a change in the concentration of current carriers occurs which, as a result, causes disturbances in the conductivity of the semiconductor expressed by a numerical value in units of volts. Several to dozens of sensors are used for qualitative measurement of air [
30]. Each individual sensor responds differently to the presented gas sample, resulting in a configuration of signals of the entire matrix, which gives us a picture of the smell of a particular gas sample.
The purpose of our research was to find out whether semiconductor gas sensors are able to distinguish the odors of individual components of a bee nest, and thus we wanted to find out whether a device based on a matrix of these sensors is able to recognize the contents of the bee cells of a comb.
3. Variant of Data Procesing and Analysis
The results in two variants were analyzed: (1) Variant 1, with a value of 270 s for sensor readings from the sample measurement (exposure phase), and (2) Variant 2, with a value of 270 s for sensor readings from the sample measurement (measurement phase) with baseline correction by subtracting the last 600 s of the surrounding air measurement (flushing phase).
A five-times cross validation 2 (5xCV2) test was performed. We performed additional tests in five-times Monte Carlo cross validation 25 (trained and tested 25 times) [
31,
32]. The TRN data partition coefficient was set to TST (0.7–0.3). Fourteen classifiers were tested:
Due to the fact that the samples were limited in availability, the findings are supported by radar plot visualizations to illustrate the ability to distinguish between classes. For this reason, classification was performed in a one vs. all model, where we confronted a different central class with the others each time or used a class pair strategy.
4. Results
The starting point for investigating classification possibilities is to visualize the average readings of the individual TGS sensors with the baseline correction. Visualization on radial graphs indicated a clear separability of classes. The highest average readings for individual sensors were obtained for class 3, and the lowest were found for class 1. Higher average readings for individual sensors were obtained for all classes in the wooden chamber (above 0.8 V for TGS826, TGS 2602, and TGS2603 for class 3), and lower results were found in the Styrofoam chamber (below 0.7 V for TGS826, TGS 2602, and TGS2603 for class 3) (
Figure 6 and
Figure 7).
The Monte Carlo cross-validation 25 test for class vs. all variants showed that it is possible to achieve separability in most classes at a satisfactory level of more than 60% using various classifiers. In addition, it was noted that the application of baseline correction allowed improving upon this result. The weakest separation was in class 17, where acc_balanced was usually below 0.6, and a quite low acc_class value of less than 0.3 was obtained. Class 4 obtained an accuracy balanced in Variant 1 at a borderline of 0.6, but after applying baseline correction, the value improved to almost 0.7 (
Table 3 and
Table 4).
Based on the analyses performed, nb was identified as the best classifier for the class vs. all comparison, which was a preview the results obtained for this classifier for each class and variant. The best distinguishing results in both the wooden chamber and Styrofoam chamber by the device were for the empty chamber and comb with both types of bee brood. Here, with baseline correction, acc balances of 0.7 or more were obtained. The class of an empty comb did not separate as well but was still at a satisfactory level (acc balanced above 0.6). Poorly recognized by the device were the combs with food (acc balanced below 0.57) (
Table 5 and
Table 6).
The Monte Carlo cross validation 25 class vs. class test with Variant 2 gave us surprising results. It turned out that the MCA-8 device was able to distinguish between an empty comb and a comb with brood with an accuracy of more than 83%, but the type of brood was poorly recognized by the device (acc_balanced 0.51 in the wooden chamber and 0.58 in the Styrofoam chamber). Satisfactory results were also obtained in distinguishing between an empty comb and a comb with food. In the Styrofoam chamber, the efficiency ranged from 62% (empty comb vs. comb with sugar syrup) to 72% (empty comb vs. comb with bee bread). In the wooden chamber, the empty comb and the comb with syrup were distinguished at a rate of 72%. Only the recognition efficiency of the comb with bee bread was low (acc_balanced 0.57). The differentiation of food types between each other was as poor as that of the brood types (acc balanced 0.49 in the wooden chamber and 0.57 in the polystyrene chamber) (
Table 7).
5. Discussion
Our research introduces concepts that are entirely original and unprecedented in their character, offering a fresh perspective in the field. As for the usage of semiconductor gas sensors in beekeeping, thus far, the possibility of detecting dangerous bee and brood diseases with them has been analyzed [
26,
27,
28,
40], as well as the effectiveness in recognizing the status of worker bees [
25] or honey varieties [
41]. For the first time, it has been investigated whether the gas sensor matrix is able to recognize the contents of honey bee comb cells. By analyzing the already raw results of the sensor readings, we found that the classes were separated quite well. We were surprised that the readings of most sensors were higher for the brood comb than for the food comb. In an organoleptic test, carbohydrate food in the form of congealed sugar syrup is indeed not quite aromatic, but the comb with bee bread in the perception of the human nose gives a pungent and sour smell. It was not excluded that the higher values for the sensor readings were due to the fact that cells with brood are covered with a highly aromatic layer of propolis [
15]. We observed that often the highest readings were obtained for the TGS826, TGS 2602, and TGS2603 sensors. In our other tests, the sensors from theTGS2xxx series in particular were also more sensitive [
26]. These are newer-generation sensors targeting more complex gas mixtures.
We have also shown that it is sealed brood that elicits a higher sensor response than open brood. We expected the opposite result here. We were convinced that the volatile component profile of open brood, due to its components and lack of wax cappings, would activate the sensors more effectively. Perhaps we underestimated the power of pheromones not detectable with the human nose [
5]. A sealed brood intensely produces pheromones, as this is a way to communicate with worker bees [
42].
Observations of the raw data readings clearly turned into the results of the Monte Carlo cross-validation 25 analysis. In this, 14 methods of classifying the obtained data were compared. The naive Bayes classifier (nb) proved to be the most effective method. The use of differential baseline correction (Variant 2) further strengthened this efficiency [
43,
44]. Here, we showed that the MCA-8 device with a matrix of six TGS sensors distinguished an empty chamber and a comb with sealed and open brood from other classes at a rate of more than 70%. It distinguished empty combs from other classes with an accuracy above 62%. The comb with food proved to be the most difficult one to detect, with the accuracy balanced below 0.6 in both comb chambers.
Observation of the results for the Monte Carlo cross-validation 25 test with a combination of a class vs. another class showed us that in most cases, the MCA-8 device could easily distinguish between an empty comb and a comb with contents. Significantly more sensitive were the sensors in relation to the combs with brood. In both the wooden chamber and the polystyrene chamber, this classification accuracy was above 83%. On the other hand, we obtained low results for distinguishing between a comb with sealed brood and a comb with open brood. Therefore, for the present moment, we see that for the device, these classes are indistinguishable. In practice, this is not a problem because the most important thing for the beekeeper is whether brood has appeared in the bee nest, and with the MCA-8 device, the beekeeper could monitor this.
When it came to distinguishing between empty combs versus combs with food, in most cases, we obtained an accuracy above 62%. Only in the wooden chamber when comparing classes 15 and 17 was the balanced accuracy at 0.57. Also low was the differentiation of combs with carbohydrate food from combs with bee bread. In practice, the beekeeper will expect to know if honey has appeared in the comb. We analyzed the efficiency of detecting in the comb cells the presence of bee bread and carbohydrate food in the form of a little aromatic sugar syrup. Bee bread is formed from pollen. Pollen from different plants exhibits an odor specific to the plant species [
45,
46]. At the same time, fresh pollen smells noticeably more intense. During the drying process, some of the volatile compounds volatilize under the influence of elevated temperatures, causing the dried pollen to exhibit a less intense aroma. During the storage of pollen in the comb cells and pouring honey over them to create bee bread, it is likely that the pollen is weathered and loses its aroma. In fact, it should be remembered that the entire process of making bee bread occurs at the temperature of the bee nest, which is 35 °C. Thus, semiconductor gas sensors were entitled to react poorly to combs with bee bread and sugar syrup. Based on the results, we see potential in using semiconductor gas sensors to detect food in bee combs, particularly if they will have honey, a product of botanical origin which is richer in volatile gas fractions [
3,
4]. The next step in our research should therefore be to see how the MCA-8 device will respond to the different varieties of honey collected in combs.
6. Conclusions
Performing a baseline correction yielded a clear separation of classes, and we found that the highest sensor readings were obtained for the comb with brood, while the lowest results were for an empty chamber. We showed that the MCA-8 device in the Styrofoam chamber recognized classes quite well, with the accuracy ranging from 71 to 82%. In the wooden chamber, the results were unsatisfactory for the comb with carbohydrate food and comb with bee bread, where the accuracy fell below 60%. The device successfully showed that the comb was not empty. It was particularly effective in distinguishing an empty comb from a comb with brood, achieving an accuracy of over 83%. Lower classification accuracy was observed when distinguishing an empty comb from a comb with food. We did not obtain satisfactory results when distinguishing between the types of brood or types of food present in the comb cells, with the accuracy falling below 60% and the device being least reactive to the comb with bee bread. The naive Bayes classifier (NB) proved to be the most effective classifier for the research problem presented.
The MCA-8 device reliably identified non-empty comb cells, although distinguishing between the various contents, particularly sealed brood versus open brood and carbohydrate food versus bee bread, remains challenging. Despite these limitations, the outcomes are sufficiently encouraging to anticipate that with additional data, the detector’s capability to discriminate between the comb’s contents will improve. Our research has exploratory character. The preliminary results are so satisfactory that we see potential in the MCA-8 device for practical use in beekeeping as a tool to inform the beekeeper about the situation in a bee colony. However, in order to achieve this goal, it is necessary to conduct further research, especially under variable field conditions, and train classifiers.