Classifying the Biological Status of Honeybee Workers Using Gas Sensors

Honeybee workers have a specific smell depending on the age of workers and the biological status of the colony. Laboratory tests were carried out at the Department of Apiculture at UWM Olsztyn, using gas sensors installed in two twin prototype multi-sensor detectors. The study aimed to compare the responses of sensors to the odor of old worker bees (3–6 weeks old), young ones (0–1 days old), and those from long-term queenless colonies. From the experimental colonies, 10 samples of 100 workers were taken for each group and placed successively in the research chambers for the duration of the study. Old workers came from outer nest combs, young workers from hatching out brood in an incubator, and laying worker bees from long-term queenless colonies from brood combs (with laying worker bee’s eggs, humped brood, and drones). Each probe was measured for 10 min, and then immediately for another 10 min ambient air was given to regenerate sensors. The results were analyzed using 10 different classifiers. Research has shown that the devices can distinguish between the biological status of bees. The effectiveness of distinguishing between classes, determined by the parameters of accuracy balanced and true positive rate, of 0.763 and 0.742 in the case of the best euclidean.1nn classifier, may be satisfactory in the context of practical beekeeping. Depending on the environment accompanying the tested objects (a type of insert in the test chamber), the introduction of other classifiers as well as baseline correction methods may be considered, while the selection of the appropriate classifier for the task may be of great importance for the effectiveness of the classification.


Introduction
The development of gas sensor technology, including increasing accuracy and affordability, allows research into solutions supporting various areas of economy. Practical beekeeping struggles with many problems related to the functioning of bee colonies. Among the most important factors resulting from bee biology is the presence of the queen bee. One of the disturbances of the normal state of a bee colony is queenlessness, which, when it is long lasting, usually leads to a colony's destruction. In some cases, the queenless state is difficult to recognize, even by experienced beekeepers. The phenomenon of changing the smell of a bee colony, depending on its biological status associated with the presence of the queen, gives potential for the use of gas sensor technology to support this area of the economy, which is one of the most important sectors of agriculture due to the pollination function.

Biological Status of Worker Bees vs. Odor
It is known that social insects living in large colonies can identify each other. This is due to the specific pheromone profile generated by the mechanism of homogenization

The Context of the Problem in Practical Beekeeping
During the beekeeping season, problems arise with colonies where physiological laying worker bees lay eggs. Beekeepers may find it difficult to distinguish a queenless colony in which laying worker bees started the process of laying eggs from a colony that is functioning properly, or one in which the queen has become a laying worker bee, i.e., has lost the ability to lay fertilized eggs. Individual physiological laying worker bees cannot be distinguished with the naked eye from an ordinary bee worker. The beekeeper is therefore unable to identify their presence. Laying worker bees' eggs are often laid several in one bee cell or on the sidewalls of the cell. These are characteristic symptoms, but do not always denote the existence of physiological laying worker bees who lay eggs. The presence of unfertilized eggs in the combs can sometimes confuse even experienced beekeepers, who mistakenly believe that they are dealing with the eggs of a queen. Difficulties in proper assessment of the colony's status will delay rescue procedures, leading to increased losses in the apiary.
In a properly functioning bee colony without a queen, workers can rear a new queen, a so-called emergency queen. It arises from 1-3 day-old bee larvae, which hatches from fertilized eggs previously deposited by the lost queen. This must take place within 6 days.
Even when gradually emerging laying worker bees begin to lay eggs, workers will not be able to rear a new queen from them, because these eggs are unfertilized and form drone larvae. This situation leads to the destruction of the bee colony, as a result of the gradual extinction of old workers. Although there is a chance to rear a queen from an unfertilized egg [6,7], it is so small that it is negligible from the practical point of view of beekeeping.
For the reasons described, the condition of the colony should be constantly monitored for the presence of a properly reproductive queen. The type and effectiveness of emergency procedures depend on the negative consequences of a queenless colony, which increases over time.

Achievements to Date in the Use of Gas Sensors for this Type of Task
The electronic nose is a device that detects unidentified, complex substances. It is made up of a matrix of partially sensitive chemical sensors capable of recognizing simple or complex odors on the basis of a pattern recognition system [8]. The use of the electronic nose is one of the methods based on a comprehensive analysis of the volatile fraction without its division into individual components. This distinguishes it from methods based on the analysis of separated sample components, such as chromatography techniques. It does not require a time-consuming process of sample preparation, which also is usually destroyed [9]. In addition to the selection of sensors, the basis for the method is the appropriate analysis of measurement data, which can lead to the most effective classification.
There are many methods of analysis in the field of using the electronic nose in beekeeping, including linear discriminant analysis (LDA), principal component analysis (PCA), and cluster analysis (CA) with the furthest neighbor method (kNN). Good results have also been obtained using the artificial neural network (ANN) machine learning techniques, which use a neural network model based on a multilayer perceptron that learned using a backpropagation algorithm [8][9][10][11][12][13][14][15].
A related study found that the odor profile of the entire colony changed depending on the degree of infestation of the bee parasite Varroa destructor mite [16]. In this case, the gas sensors reacted to samples of the hive air taken directly from the bee colony being tested, constituting its general odor in the nest. Classification according to the degree of parasite infestation was successfully performed [10]. Rather than using one type of sensor, an electronic nose was employed. The sensor matrix was also successfully used to quickly recognize five different types of honey collected in Poland [9]. Other attempts to classify honey according to its type and origin also gave good results [12,13].

Characteristics of the Studied Objects
The samples were obtained from the Apis mellifera carnica bee colonies situated in the experimental apiary of the Department of Apiculture (University of Warmia and Mazury in Olsztyn, Poland), coordinates 53 • 44 41.8" N 20 • 26 57.2" E. Three classes of objects (samples) from bee colonies were used: • Young workers-class 5 • Old workers-class 6 • Workers from colonies with physiological laying worker bees-class 7 (Table 1) Additionally, an empty test chamber was tested as a control class-class 1. Young worker bees were obtained from sealed brood collected from six bee colonies on 18 and 23 October 2018. The brood honeycombs were placed in an incubator in an insulator to prevent divergence of bees and were kept at 35 • C until the bees emerged. As many as 100 emerged bees, 0-1 days old, were counted for each trial and placed in an aluminum mesh cage ( Figure 1). In this way, 10 samples of young bees were prepared.
Old worker bees originated from the outer nest combs (not covered by brood) from six bee colonies. The samples were taken on 17 and 18 October 2018. After the CO 2 anesthesia, 100 bees were counted for each test and placed in an aluminum mesh cage. Before testing, the samples were kept in an incubator at 35 • C for a minimum of 1 h to calm the bees. As many as 10 samples were prepared this way.
Workers from colonies with physiological laying worker bees originated from honeycombs taken from two long-term queenless colonies in which the presence of laying worker bees' eggs, drone brood, a large number of drones, and no worker bee brood were found. The samples were taken on 24 and 25 September 2018 and on 4, 5, and 23 October 2018. After the CO 2 anesthesia, the drones were collected and 100 bees were counted and placed in an aluminum mesh cage. As many as 10 samples were prepared this way ( Figure 2).

Construction of a Laboratory Measuring Stand-Multi-Sensor Signal Recorder
The research used a prototype device constructed in the Laboratory of Sensor Technique and Indoor Air Quality Studies at Wroclaw University of Science and Technology. It was a multi-sensor, multi-channel signal recorder ( Figure 3). The sensor matrix integrated into the module (named MCA-8) was made of six Figaro semiconductor gas sensors ( Figure 4A).  Sensors commonly available for purchase were selected ( Table 2). Each of the sensors placed in the matrix was led by an individual gas input and output, as well as appropriate electrical connections. The device was characterized by a dynamic method of sampling the tested gas, which was supplied to the matrix through a program-selected channel with the use of a pump. After passing through the separate chambers of each sensor, the gas was exhausted to the output of the device. The device had eight sequentially working channels creating separate gas paths to the device matrix. The operation of the device was controlled by reading the parameters from the configuration file recorded on the SD card, which made it possible to set the time and sequence of individual channels, heater power, number of repetitions, and pump power. The desired control of the gas path was carried out by valves. Measurement results were recorded on an SD card and sent via the GSM (Global System for Mobile Communications) communication module ( Figure 4C) to a dedicated server in the form of structured CSV (comma-separated values) files. A single measurement point was taken every 1 s and was the average reading of the measurement in a given second; this measurement was taken separately on each of the sensors. The device was powered by 220V mains voltage; however, it can also be run on the built-in 12V battery. The battery is charged from the mains or with a set of solar panels using the charge regulator control ( Figure 4B).

Construction of a Laboratory Measuring Stand-Resarch Chamber
For the laboratory tests of hive environment objects, special research chambers were built using measuring instruments ( Figure 5). The chambers, measuring 32 × 22 × 32 cm, were made of Plexiglas. Each was equipped with three pneumatic connectors constituting an element of the gas track, three sealed visors for inserting any sensors, flexible plugs for interchangeable use for each visor (full and notched-sealing the introduction of, e.g., sensor cables), a fan equalizing the level of volatile substances from the tested object in the entire volume of the chamber, and an adjustable air supply valve.
Two inserts for the research chamber were prepared: polystyrene and wooden. The inserts reflected the properties of the materials of which the hives are built (wood, polystyrene).
The construction of the chamber met the following assumptions: • a tight structure, aimed at eliminating factors that may interfere with the odor of the tested objects, • small dimensions, maximizing the concentration of volatile substances around the sensors, • adjustable tightness of test chambers in terms of the possibility of external gas inflow, • using neutral, odorless materials to build the chambers, with removable inserts, • the possibility of measuring the pressure in the chamber, • the possibility of mechanical equalization of the level of volatile substances from the tested object in the entire volume of the chamber through use of the fan, and • the possibility of simultaneous measurement of a given object with at least two devices.

Measurement Procedure
The measurements were carried out in the Laboratory of Bee Products Quality at the Department of Apiculture at the University of Warmia and Mazury in Olsztyn. Two twin measuring devices, called M1 and M2, were used simultaneously. Before starting the first measurements on a given day, the device was heated up; it ran for a minimum of 1 h at 100% of the heater's power, without the pump running (pump power 0%). Following this, measurements were carried out continuously on a given day to prevent the device from cooling down. The study was carried out on one of eight working channels (1-8). The working channel was changed after every two days of work. Object measurements were made at room temperature with both devices simultaneously.
The tested objects were placed in the research chamber. Directly above the tested object, at a distance of 2-3 cm, the tip of the pneumatic conduit was introduced to collect a gas sample above the object. The gas was sucked dynamically through a working pump of the device and polyethylene (PE) pipes introduced through sealed pneumatic joints ( Figure 5A). The gas was sent to the chamber of the sensory matrix of the device. In addition, the filter was placed in the gas track to retain solid particles ( Figure 5B). The sucked air was replenished into the chamber freely from the ambient air through the fully open inlet valve ( Figure 5D). The gas sampling procedure was not to cause changes in the atmospheric pressure in the test chamber. During all measurements, the pump was running at 50% power.
The measurement sequence of a given object consisted of the 10 min phase of exposure to the test object placed in the chamber. Immediately after exposure to the tested object, the device was switched to the sensor regeneration phase, following the set configuration. Channel 8 was always used; the air was drawn through the carbon filter for the same time, with the same power of the pump and heaters. Each object was tested twice; immediately after the end of the measurement in the polystyrene chamber, the object was transferred to the chamber with a wooden insert and a new measurement of the same object was started.
The single described phase of exposure to an object and the subsequent regeneration phase together formed the measurement of one object, during which the measurement signal reading was recorded every second. This gave a total of 600 readings during the exposure phase and 600 readings during the sensor regeneration phase. This resulted in a total of 1200 readings for one full measurement of an object in the chamber with a polystyrene insert and 1200 readings for a full measurement of the object in the chamber with a wooden insert for each of the devices.

Data Analysis Procedure
The measurement data collected was analyzed. In the first step, the data in the prepared visualization system was reviewed. Based on the observation of line charts from sensor readings, no disturbances were found in the course of measurements of individual objects, and rapid stabilization of the signal was noted. Based on the observation of the average reading graphs for the objects in a given group for individual sensors, 270 s of the measurement were arbitrarily determined, after the signal stabilization, as a reference for further analyses ( Figure 6). The results were analyzed before and after the baseline adjustment. The baseline correction improved the separability of the tested objects within the classes in previous research in the field of beekeeping, based on the same type of sensor matrices [6,7]. The baseline differential correction was applied by subtracting from the value of the measurement of the tested object in 270 s the values from the last 600 s of the ambient air measurement.
The results for the objects tested in chambers with both types of inserts (wooden and polystyrene) were analyzed and compared separately for both devices.
The analyses aimed to investigate the differences in the responses of gas sensors exposed to air from worker bees with different biological status according to the assumed class division and type of insert in the chamber in which the measurement was performed (wooden or polystyrene) and to indicate an effective method of classification of the tested objects. In beekeeping practice, the presence of physiological laying worker bees in the bee colony creates a problem; therefore, special attention was paid to class 7 objects.
The possibility of recognition was tested, which consists of assigning a class to the tested object. Classification consists of a decision on which class the tested object can be assigned. This task was performed using classifiers constructed as follows.
In basic research, a five-fold cross-validation 2 test was performed. The nearest neighbor (kNN) algorithm with the default settings of the rough set exploration system (RSES) tool with automatically selected k was chosen as the classifier.
Following this, customized techniques dedicated to the task were used. Studies with dedicated methods were carried out according to the Monte Carlo cross-validation (MCCV) model, using the same subsets of data for all techniques studied. Conditional attributes used in the research were numerical, while decision classes were categorical; hence, we applied a Naïve Bayes classifier with a descriptors indiscernibility ratio [17], the kNN method with Euclidean, Manhattan, and Canberra metrics [17], and the weighted voting classification technique-algorithm 811 [17]. To correctly estimate the effectiveness of unbalanced data, we used balanced accuracy (the equivalent of the recall parameter) and true positive rate (the equivalent of the precision parameter). Where more than two classes were classified, each of these parameters was calculated separately for each class. Balanced accuracy is the average accuracy of the classification from all decision classes, while the accuracy of classification of a given test class is understood as the percentage of correctly classified objects in that class. True positive rate is the percentage of objects of a given class positively classified in relation to all objects classified in that class. The coverage parameter is the percentage of classified objects. In our case it was always equal to one; in other words, each test object was classified.

The Visualization of the Tested Classes
As an additional element, we attempted to visualize the sensor readings for individual classes in the radar chart (Figures 7-10). This is akin to a simple scent signature. To achieve this goal, we normalized the values of the TGS attributes to a range of [0.1] using Equation (1). Normalization of TGS i (ob j ) (i-th descriptor of j-th object) into [a, b] interval consists of the following step:

The Visualization of the Tested Classes
As an additional element, we attempted to visualize the sensor readings for individual classes in the radar chart (Figures 7-10). This is akin to a simple scent signature. To achieve this goal, we normalized the values of the TGS attributes to a range of [0.1] using Equation (1). Normalization of TGSi(obj) (i-th descriptor of j-th object) into [a, b] interval consists of the following step: * (1) Then we calculated the average values in the classes for the individual TGS attributes (see Equation (2)) and squared the obtained values (see Equation (3)), as follows: (3) Figure 7. The visualization of the average reading intensity of TGS sensors for decision classes 1, 5, 6, and 7 using measuring device M1; wooden chamber on the left, polystyrene chamber on the right. [v] [v] Figure 7. The visualization of the average reading intensity of TGS sensors for decision classes 1, 5, 6, and 7 using measuring device M1; wooden chamber on the left, polystyrene chamber on the right.

The Visualization of the Tested Classes
As an additional element, we attempted to visualize the sensor readings for individual classes in the radar chart (Figures 7-10). This is akin to a simple scent signature. To achieve this goal, we normalized the values of the TGS attributes to a range of [0.1] using Equation (1). Normalization of TGSi(obj) (i-th descriptor of j-th object) into [a, b] interval consists of the following step: * Then we calculated the average values in the classes for the individual TGS attributes (see Equation (2)) and squared the obtained values (see Equation (3)), as follows: (3) Figure 7. The visualization of the average reading intensity of TGS sensors for decision classes 1, 5, 6, and 7 using measuring device M1; wooden chamber on the left, polystyrene chamber on the right. [v] [v] [v] [v]   These results clearly show that classes are potentially different and separable.

Searching for the Dedicated Method-Selected Results
We presented our implementation using the multiple MCCV model. MCCV is based on multiple executions of the train and test method, with a defined random percentage, split into training and test parts. In search of an effective, simple classification method, we implemented the Naive Bayes classifier [14], the weighted classification 811 method [14], and the local kNN using Manhattan, Euclidean, and Canberra metrics [14]. Naive Bayes uses sum instead of multiplication to avoid zeroing of parameters and descriptors' indiscernibility ratio.
We considered the following classifiers: 1. canberra.1nn, Figure 10. The visualization of the average reading intensity of TGS sensors for decision classes 1, 5, 6, and 7 using M2 with baseline correction; wooden chamber on the left, polystyrene chamber on the right.
Then we calculated the average values in the classes for the individual TGS attributes (see Equation (2)) and squared the obtained values (see Equation (3)), as follows: These results clearly show that classes are potentially different and separable.

Searching for the Dedicated Method-Selected Results
We presented our implementation using the multiple MCCV model. MCCV is based on multiple executions of the train and test method, with a defined random percentage, split into training and test parts. In search of an effective, simple classification method, we implemented the Naive Bayes classifier [14], the weighted classification 811 method [14], and the local kNN using Manhattan, Euclidean, and Canberra metrics [14]. Naive Bayes uses sum instead of multiplication to avoid zeroing of parameters and descriptors' indiscernibility ratio.
We considered the following test options, using two devices (M1 and M2): (I) M1 device in a wooden box, (II) M1 device in a polystyrene box, (III) M2 device in a wooden box, (IV) M2 device in a polystyrene box, (V) M1 device in a wooden box using baseline correction, (VI) M1 device in a polystyrene box using baseline correction, (VII) M2 device in a wooden box using baseline correction, and (VIII)M2 device in a polystyrene box using baseline correction.
We considered the following variants: manhattan.811, 9. maxminnormalized.1nn, and 10. maxminnormalized.811. Table 3 and Figure 11 presents the results of classifiers operation depending on the options and variants for the four-class problem, based on the accuracy balanced and true positive rate parameters, and taking into account the following calculations: • Accuracy balanced, the best classifier is m5, in five options, reaching the value of 0.646 for Option III, • True positive rate for class 1, the best classifier is m2, in four options, in three options reaching the value of 1, • True positive rate for class 5, the best classifiers are m5 and m10 pari passu, each in two options, while the m1 classifier reaches the highest value of up to 0.674 in Option VII, • True positive rate for class 6, the best classifiers are m4 and m5 pari passu, each in two options, while the m5 classifier reaches the highest value of up to 0.684 for Option VI, and • True positive rate for class 7, the best classifier is m5 in three options, with m10 reaching the highest value of 0.844 for Option V. The best classifiers and their values are 5xMCCV5, depending on the option for the accuracy balanced (Acc balanced) parameter and the best classifiers for the true positive rate parameter according to individual classes (Tpr 1, Tpr 5, Tpr 6, and Tpr 7). As a summary, the classifiers that most often gave the best results for a given parameter (column Best classifier/parameter) and options (row Best classifier/option, TPR parameter) were given.
The best results in the four-class problem are given by the use of the m5 classifier, which produces the highest values in five options for accuracy balanced, reaching a value of up to 0.646 in Option III. In the case of the true positive rate class 7 parameter, the m5 classifier is also the best for the greatest number of options (3/8), reaching a value of up to 0.73 in Option I.
The results of the classifiers related to class 7 for variant 7 vs. 1, 5, 6 were compared. All options for the M1 device were selected for presentation. The data in Tables 4-7 correspond to Options I, II, V, and VI, respectively. In the case of type 1 vs. all test for class 7 (7 vs. 1, 5, 6), based on the results presented (Tables 4-7), large discrepancies in the values of the parameters depending on the classifier used can be observed. Depending on the option, the largest discrepancies in the true positive rate 7 parameter between the best and the worst classifiers ranged from 0.307666 in Option VI to 0.410713 in Option I, and in the case of accuracy balanced, from 0.131192 in Option I to 0.208876 in Option II. For Option II, the accuracy balanced parameter had values from 0.487912 (m3 classifier) to 0.696788 (m5 classifier), and the true positive rate parameter for class 7 had values from 0.195856 (m3 classifier) to 0.608952 (m5 classifier). A comparison of the results of the key parameters of Options I and II for all variants is shown in Figure 12. Significantly better results are observed for the wooden box (Option I). For Option II, the accuracy balanced parameter had values from 0.487912 (m3 classifier) to 0.696788 (m5 classifier), and the true positive rate parameter for class 7 had values from 0.195856 (m3 classifier) to 0.608952 (m5 classifier). A comparison of the results of the key parameters of Options I and II for all variants is shown in Figure 12. Significantly better results are observed for the wooden box (Option I).
For Option VI, the accuracy balanced parameter had values from 0.540308 (m3 classifier) to 0.74224 (m10 classifier), and the true positive rate parameter for class 7 had values from 0.342526 (m4 classifier) to 0.650192 (m6 classifier). A comparison of the results of the key parameters of Options I and V for all variants is shown in Figure 13. Generally better results can be observed for option without baseline correction (Option I). Figure 13. Baseline correction. Comparing of average classification result from 25 tests, 5xMCCV5 experiment, 7 vs. all, M1 device, wooden chamber with (Option V) and without (Option I) baseline correction, all classifiers, accuracy (acc) balanced, true positive rate 7 (tpr7). We can see that in Option I, the accuracy balanced parameter has higher values (except for the m8 variant) and the tpr7 parameter has higher values in 4 variants, so baseline correction decreased the accuracy balanced value, but increased the tpr7 value. However, the m5 classifier, which is best for both options, gives better results without baseline correction (Option I).
Tests 1 vs. all performed for each of the classes in all options showed that the highest value of the parameter true positive rate = 1 was obtained in the test of classes 1 vs. 5, 6, and 7 for Options IV and VIII for several different classifiers (Table 8). In the test of class 7 vs. 1, 5, and 6, which is the most interesting for us, the highest value of true positive rate = 0.742 was obtained for Option I using the m5 classifier. Table 8. Classes 1, 5, 6, and 7 vs. all-true positive rate; best classifiers, 5xMCCV5-average classification results from 25 tests: all classes, M1 and M2 devices, wooden and polystyrene chambers, with and without baseline correction (Options I-VIII). Note: Tpr 1 = true positive rate class 1, Tpr 5 = true positive rate class 5, Tpr 6 = true positive rate class 6, and Tpr 7 = true positive rate class 7. The best classifiers and their results depending on the option for the true positive rate parameter in tests 1 vs. all performed for each class. As a summary, the classifiers delivering the best results for a given parameter (column Best classifier/parameter) and option (row Best classifier/option) were given. In individual options, the m5 classifier appears as the best (or equivalent) most frequently. In the case of parameters, the m5 classifier also appears most often (twice: in test 6 vs. 1, 5, 7 and 7 vs. 1, 5, 6).
In a similar comparison for the accuracy balanced parameter (Table 9), the highest value of 0.964 was obtained in the test class 1 vs. 5, 6, and 7 for Option VIII using the m1 classifier. In the test of class 7 vs. 1, 5, and 6, the highest value of true positive rate = 0.742 was obtained for Option I using the m5 classifier. The best classifiers depending on the options for the accuracy balanced parameter in tests type 1 vs. all performed for each class. As a summary, the classifiers delivering the best results for a given parameter (column Best classifier/parameter) and option (row Best classifier/option) were given. In individual options, the m5 classifier appears as the best (or equivalent) most frequently. In the case of parameters, the m5 classifier also appears most often (twice: in test 6 vs. 1, 5, 7 and 7 vs. 1, 5, 6).
We found that m5, euclidean.1nn, was most often the best classifier for 7 vs. 1, 5, and 6 among all the options. Thus, for this classifier, for the class 7 distinction task (7 vs. 1, 5, 6), Table 10 summarizes the results of the accuracy balanced and true positive rate param-eters in all options, including device (M1, M2), type of insert in the chamber (wooden, polystyrene) and use of a baseline correction (without baseline correction, with baseline correction). The highest values of accuracy balanced (0.763) and true positive rate (0.742) were obtained in Option I. To assess the validity of introducing the baseline correction method, Options I, II, III, and IV were respectively compared in pairs with Options V, VI, VII, and VIII. The only difference between these pairs was the baseline correction factor. We found that the baseline correction increases the effectiveness of the classification in both calculated parameters (accuracy balanced and true positive rate class 7) only for the M2 device with the use of a polystyrene chamber (Option VIII). In other cases, it caused deterioration of at least one of the parameters (Table 10).
In the case of accuracy balanced and true positive rate in test 7 vs. 1, 5, and 6, in individual options for the m5 method, the best results were achieved for both devices in the option with a wooden chamber (Options I and V). The baseline correction increased the efficiency of the classification in both calculated parameters (accuracy balanced and true positive rate class 7) only in the case of the M2 device with the use of a polystyrene chamber. In other cases, it caused deterioration of at least one of the parameters (Table 10).

Discussion
We can see that the results of the research indicate a profit in distinguishing classes, greater than the standard deviation and considering the expected value of random classification.
Considering that, with all the variants, there are 400 tests to perform, we specify the best results and techniques, as follows.

Four-Class Problem
Without using the baseline correction (Options I-IV), the m5 classifier worked best (it was the best twice), and after its introduction, m6 was the best (it was the best twice). However, globally, for all options and parameters (accuracy balanced, true positive rate for classes 1, 5, 6, 7), the m5 classifier most often appeared as the best; therefore, for this type of task, the m5 classifier is recommended.
In the chamber with a wooden insert (Options I, III, V, and VII), m5 turns was the best (it was the best twice), and in the chamber with a polystyrene insert (Options II, IV, VI, and VIII), m6 was the best (it was the best three times). Therefore, in the four-class problem, the selection of classifiers should be considered depending on the environment in which the tested object is placed. However, when the interest is limited to distinguishing class 7, the m5 classifier should be used as it yielded the best results for both types of chamber without baseline correction.

Choosing the Best Classifier to Distinguish Class 7
In the case of testing 7 vs. 1, 5, and 6, which has the best chance of implementation due to the potential of solving a defined problem occurring in practical beekeeping (detection of colonies with physiological laying worker bees), the m5 classifier was the best in seven out of eight options for the true positive rate parameter, which had a value of up to 0.742 for Option I (M1 device in a wooden chamber) and in five of eight options for the accuracy balanced parameter, the value of which reached 0.763 (also for Option I). One notable finding was that the options introducing potentially more odor noise from the insert material in the chamber (wooden insert, Options I, III, V, and VII) gave higher parameter values.
In summary, without building decision trees for the selection of the classifier depending on a given detailed problem, the m5 classifier is recommended. It was the most appropriate for the defined problem of class 7 differentiation, with the best results in Option I (wooden chamber without baseline correction). The highest results achieved, a true positive rate of 0.742 and an accuracy balanced value of 0.763 in the test 7 vs. 1, 5, and 6 for Option I, are promising and can be used in practical beekeeping. It is particularly noteworthy that wood, a popular hive construction material, does not interfere with the results in a way that would prevent class distinctions.
For the recommended variant of the m5 classifier, the baseline correction for the true positive rate and accuracy balanced parameters brought mixed results, and ultimately showed that no baseline correction should be made. We found that baseline correction, which in previous studies brought good results, should, in the case of the given problem and the selected classifier, be rejected or used only in variants for the polystyrene chamber, where it gave a slight improvement in results.
It is worth noting that there are significant differences in the accuracy of classification between the M1 and M2 devices. As both devices, constructed similarly, were used to measure the same objects at the same time, the difficulty of achieving repeatability in devices where sensors of the type used are the most important element, was confirmed. To achieve proper operation, individual calibration of each device is required.

Conclusions
The research proved that, with a device using gas sensors and based on testing a sample of 100 bees in the test chamber, the biological status of bees, specifically those from colonies with physiological laying worker bees, can be distinguished. The effectiveness of their differentiation from other classes (bees with a different biological status), determined by the parameters of accuracy balanced and true positive rate, which reached 0.763 and 0.742 in the case of the best euclidean.1nn classifier, may be satisfactory in the context of practical beekeeping. Depending on the environment accompanying the tested objects (the type of insert in the test chamber), the introduction of other classifiers and baseline correction methods can be considered; the selection of the appropriate classifier for the task may be of great importance for the effectiveness of the classification. Due to the differences between devices in the achieved key parameters, the potential problem of calibration deserves special attention.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to business secret.