Method for determining a binary classifier and method for assigning a sample to one of two possible classes on the basis of spectroscopic data relating to the sample
Patent Information
- Authority / Receiving Office
- EP · EP
- Patent Type
- Applications
- Current Assignee / Owner
- TECH HOCHSCHULE OSTWESTFALEN LIPPE UNIV OF APPL SCI & ARTS
- Filing Date
- 2024-08-13
- Publication Date
- 2026-07-01
Smart Images

Figure EP2024072776_27022025_PF_FP_ABST
Abstract
Description
[0001] Method for determining a binary classifier and method for assigning a sample to one of two possible classes based on spectroscopic data of the sample
[0002] Description
[0003] The invention relates to a computer-implemented method for determining a binary classifier.
[0004] The invention further relates to a computer-implemented method for assigning a sample to one of two possible classes based on spectroscopic data of the sample.
[0005] The invention also relates to a data processing device, a computer program product, and a computer-readable data carrier.
[0006] There is currently an effort to be able to determine the sex of a future chick while the egg is fertilized.
[0007] In the bird egg, different fluorophores develop during development in male and female chicks. Due to their complex structure, these molecules exhibit unpredictable fluorescence properties. Fluorescence involves energy transitions from the excited state to the ground state of the molecule. This process is time-dependent.
[0008] Document WO 2021 / 144420 A1 describes a device and a method for optical in-ovo sex determination in a fertilized bird egg. The device comprises a light source for emitting excitation radiation to excite fluorescence in a region inside the bird egg, a spectroscopic device for the time- and / or spectrally resolved analysis of fluorescence radiation emitted from the region inside the bird egg, and an evaluation unit for sex determination from the data obtained by the spectroscopic device.
[0009] Based on this, the object of the invention is to provide means to increase the accuracy of in-ovo sex determination and / or to improve the robustness of the method.
[0010] According to the invention, the object is achieved by the features of the independent claims. Preferred embodiments of the invention are specified in the subclaims, each of which, individually or in combination, may represent an aspect of the invention.
[0011] According to the invention, a computer-implemented method for determining a binary classifier is provided, wherein the classifier is configured to assign a sample to one of two possible classes on the basis of spectroscopic data of this sample, comprising the steps
[0012] Receiving two-dimensional spectroscopic data of the sample, wherein the data comprise discrete values in a wavelength dimension and a time dimension, determining features Fl to F5 formed along the time dimension of the data for a plurality of wavelengths and / or for a plurality of wavelength ranges, wherein the features
[0013] • Fl : statistical moments of the 2nd to 4th order of the data in the time dimension,
[0014] • F2: Coefficients of a best fit line of the data in the time dimension,
[0015] • F3 : Real coefficients of a Fourier transform of the data in the time dimension,
[0016] • F4: coefficients of a best fit line through the real coefficients of the Fourier transform determined for feature F3, and
[0017] • F5: Entropy of the data in the time dimension include,
[0018] Determining linear combinations of the features F1 to F5 for the multiple wavelengths and / or for the multiple wavelength ranges by analyzing the features with regard to their discriminatory power for the two classes, and
[0019] Determine a subset of the determined linear combinations by analyzing the linear combinations with regard to their discriminatory power for the two classes.
[0020] Furthermore, the invention relates to a computer-implemented method for assigning a sample based on spectroscopic data of the sample into one of two possible classes, and in particular for assigning a fertilized bird egg to one of two possible sexes, comprising the steps
[0021] Receiving two-dimensional spectroscopic data of the sample, wherein the data comprises discrete values in a wavelength dimension and a time dimension, and applying a classifier to the received data, wherein the classifier was determined using the above methods. Furthermore, the invention relates to a data processing device comprising means for executing one of the two above methods or means for executing both methods.
[0022] Furthermore, the invention relates to a computer program product comprising instructions which, when the program is executed by a computer, cause the computer to carry out one of the two above methods or both of the above methods.
[0023] Furthermore, the invention relates to a computer-readable data carrier on which the above computer program product is stored.
[0024] One aspect of the invention is that it has been found that when assigning a sample to one of two possible classes based on spectroscopic data of the sample, an improved hit rate is achieved if not only statistical features of the spectroscopic data are considered to determine the classifier in the training phase.
[0025] A further aspect of the invention is that a two-stage method is used to determine the classifier. It has been found that a classifier that is constructed by determining the linear combinations of the features F1 to F5 for the multiple wavelengths and / or for the multiple wavelength ranges by analyzing the features with regard to their discriminatory power for the two classes, and by determining a subset of the determined linear combinations by analyzing the linear combinations with regard to their discriminatory power for the two classes, achieves a higher hit rate in assigning the sample. In other words, a model is built using the training data in a two-stage method.
[0026] Furthermore, a classifier determined according to the method according to the invention can also provide a much more robust classification method, allowing samples whose spectroscopic data were not measured under ideal conditions and exhibit an elevated signal-to-noise ratio to still be assigned to the two possible classes with a high accuracy rate. Preferably, the classifier is a linear classifier. A linear classifier separates the classes along a linear hyperplane.
[0027] The two-dimensional spectroscopic data of the sample are preferably present in a two-dimensional data matrix, wherein one row of the data matrix preferably comprises the temporal behavior and in particular the decay curves for individual singular wavelengths or an averaged temporal behavior and in particular averaged decay curves for several directly adjacent singular wavelengths. In the second case, one row of the data matrix thus corresponds to the temporal behavior of a wavelength range. The wavelength range preferably has a bandwidth that encompasses no more than 4 nm, preferably no more than 3 nm. Further preferably, the number of adjacent singular wavelengths that are averaged for the wavelength range is no more than eight singular wavelengths and preferably no more than six singular wavelengths.
[0028] In the first step of the method for determining the binary classifier, the features F1 to F5 are first determined for the rows of the matrix. Preferably, the features F1 to F5 are determined for each row of the matrix. In other words, the features F1 to F5 are preferably formed from singular wavelengths and / or from the wavelength ranges.
[0029] With respect to the characteristic F1, the statistical moments of the 2nd to 4th order are preferably the central moments, i.e., the 2nd order central moment (standard deviation), the 3rd order central moment (skewness), and the 4th order central moment (kurtosis). With respect to the characteristic F2, the coefficients of the best-fit line are preferably the coefficients of a normal equation g(x) = ax + b through the data in the time dimension.
[0030] With respect to feature F3, the real coefficients are preferably the real coefficients of the Fast Fourier Transform of the data in the time dimension.
[0031] For feature F4, the coefficients of the best-fit line are preferably the coefficients of a normal equation f(x) = sx + t divided by the real coefficients of the fast Fourier transform determined for feature F3
[0032] With respect to feature F5, the entropy of the data in the time dimension is preferably Shannon's entropy according to E = — 2z Pz log2Pz , with Pz as the probability for the measured value z.
[0033] The features are then analyzed with regard to their discriminatory power in order to preferentially
[0034] To eliminate features with weak discriminatory power. In other words, the
[0035] Linear combinations of features are determined for each wavelength and / or for each wavelength range, with the eliminated features in the linear combination having a coefficient of zero and therefore not being considered. After this step, a linear combination of features F1 to F5 specific to each row of the data matrix is preferably available for this row.
[0036] In the subsequent step of the method, a subset of the linear combinations is determined from the resulting linear combinations. This is done by analyzing the linear combinations with regard to their discrimination power in order to preferentially eliminate linear combinations with weak discrimination power. In other words, certain linear combinations with particularly high discrimination power are preferentially identified.
[0037] In other words, it is preferred that the classifier be determined by means of feature selection and / or selection of linear combinations based on training data. In particular, it has been shown that the two-stage method can produce a binary classifier with a particularly high hit rate. The classifier is also particularly robust, as it also enables the reliable classification of spectroscopic data from the sample with a high signal-to-noise ratio.
[0038] According to a preferred embodiment of the invention, the sample is a fertilized bird's egg, and the two classes represent a male and a female sex of the fertilized bird's egg. The method for determining the classifier has proven particularly suitable for determining the sex of the fertilized bird's egg. In particular, the classifier determined according to the present method has achieved hit rates of 100% in classifying the fertilized bird's egg.
[0039] According to a further preferred development of the invention, the received two-dimensional spectroscopic data are intrinsic fluorescence data of the sample, and in particular intrinsic fluorescence data of the sample, in particular of the fertilized bird's egg, acquired by means of time-resolved laser-induced fluorescence spectroscopy (zLIF) and / or time-correlated single-photon counting (TCSPC). In other words, with regard to determining a binary classifier, which is preferably used for in-ovo sex determination of a fertilized bird's egg, knowledge of the lifetime and decay profile of excited molecular states (time dimension of the two-dimensional data) in addition to the energy of the emitted photons (wavelength dimension of the two-dimensional data) is relevant for identifying the sex of the fertilized bird's egg.
[0040] For the detection of autofluorescence radiation, spectroscopic data can be acquired using laser-induced fluorescence techniques. This technique relies on the fluorescence excitation of the sample by an excitation pulse from a light source such as a laser or LED. The fluorophores present in the sample, preferably in the bird's egg, are excited by the laser. After some time, usually on the order of a few nanoseconds to microseconds, the excited fluorophores lose their excitation and emit light with a wavelength longer than the excitation wavelength. This fluorescence light is typically recorded using a photomultiplier tube (PMT) or a multi-channel detector designed as an ICCD camera.
[0041] In some methods - also known as boxcar methods - the complete spectrum is recorded at different times after an excitation pulse using an ICCD camera.
[0042] It is also possible to use time-correlated single-photon counting (TCSPC) to record the intrinsic fluorescence radiation. With TCSPC, the complete spectrum is not recorded after each excitation pulse. Instead, individual photons of a periodic light signal – in this case, the intrinsic fluorescence radiation – are detected, and the respective times between the excitation pulse of the pulsed excitation radiation and the photon's arrival at the detection device are determined. In other words, the time measurement is started by the excitation pulse, and the photon emitted during the transition from the excited state to the ground state stops the measurement. The measurement is repeated multiple times, and the individual time-correlated photons (relative to the excitation pulse) are sorted into a so-called TCSPC histogram according to their measured time. The TCSPC histogram represents the temporal progression of the intrinsic fluorescence radiation after excitation.The TCSPC histogram generated by the detection device preferably has a bin width for histogram classes ranging from 1 ps to 50 ps, preferably from 10 ps to 20 ps. The bin width of the TCSPC histogram can preferably be adapted to the device and / or sample to be examined. Further preferably, when adapting the bin width of the TCSPC histogram, a temporal resolution of the entire device—and particularly preferably a full width at half maximum (FWHM) of the instrument response function (TRF)—is taken into account. The full width at half maximum (FWHM) of the instrument response function (TRF) is essentially dependent on the light source and a pulse length generated by the light source and / or on a detector element of the detection device.
[0043] According to a preferred development of the invention, it is provided that, in order to determine the features F2 to F5, the data in the time dimension are present as normalized data, such that a mean value of the data in the time dimension is zero. Further preferably, it can be provided that, in order to determine one or more of the features F2 to F5, the data are also normalized such that a standard deviation of the data in the time dimension is one. It has been shown that better classification results are achieved if the raw data provided by the measurement are not used directly to determine the features F2 to F5. Instead, it is advantageous if the time dimension of the data is present in normalized form, in which the mean value p = 0 and, preferably for some or all of the features F2 to F5, the standard deviation o = 1.
[0044] In this context, however, according to a further preferred development of the invention, it is provided that for determining the feature F1, the data in the time dimension are available as non-standardized data. In other words, the non-standardized raw data are preferably used to determine the standard deviation, skewness, and kurtosis.
[0045] In connection with features F3 and F4, according to a further development of the invention, the real coefficients of the Fourier transform of the data are arranged in ascending order in the time dimension of feature F3 and / or the coefficients of the best-fit line are determined by the real coefficients of the Fourier transform determined for feature F3 on the basis of ascending real coefficients of the Fourier transform. In other words, for feature F3, the real coefficients of the Fourier transform are sorted—namely, in ascending order. Furthermore, in connection with feature F4, the best-fit line f(x) = sx + t is preferably formed by the ascending real coefficients of the Fourier transform.
[0046] In connection with the determination of linear combinations, according to a further development of the method, the determination of linear combinations of the features F1 to F5 includes determining coefficients of the linear combinations. The linear combinations are preferably linear combinations according to where Ci is the respective coefficient of the feature Fi. The coefficients Ci can assume any desired values. If it is determined by analysis of the features with regard to their discrimination strength that a feature does not have a high discrimination strength, it is preferably provided that the corresponding coefficient of the feature in the linear combination is 0, and the feature is eliminated accordingly. In this context, it is preferably provided that the step of determining linear combinations of the features Fl to F5 for the plurality of wavelengths and / or for the plurality of wavelength ranges comprises defining a coefficient of the linear combination as zero for features whose discrimination strength lies below a predefined threshold.According to a further preferred development of the invention, the step of determining the linear combinations of the features F1 to F5 for the plurality of wavelengths and / or for the plurality of wavelength ranges is provided by analyzing the features with regard to their discrimination strength for the two classes; and / or that the step of determining the subset of the determined linear combinations by analyzing the linear combinations with regard to their discrimination strength for the two classes comprises analysis by means of linear discriminant analysis. In other words, the measured spectroscopic data are preferably processed by feature engineering to determine the classifier, wherein features and linear combinations formed from the features with weak discrimination strength are eliminated.It has been shown that a classifier determined without eliminating features and / or without eliminating linear combinations has a lower hit rate than with eliminating features and / or eliminating linear combinations.
[0047] In this context, according to a further preferred development, it is provided that a discriminant function and preferably the Fisher discriminant function and / or a hit rate of the determined classifier are used as a metric for the discrimination strength during the analysis.
[0048] As already mentioned, the invention also relates to a method for assigning a sample based on spectroscopic data of the sample into one of two possible classes, and in particular for assigning a fertilized bird egg to one of two possible sexes, comprising the steps
[0049] Receiving two-dimensional spectroscopic data of the sample, the data comprising discrete values in a wavelength dimension and a time dimension, and applying a classifier to the received data, the classifier being determined using the method described above.
[0050] Preferably, the sample is a fertilized bird's egg. With regard to the method, the sex determination of the bird's egg is preferably carried out by prioritizing specific linear combinations, with the linear combinations being formed from the features F1 to F5 derived from the time dimension of the data.
[0051] The person skilled in the art will derive further technical aspects and advantages of the method for assigning a sample to one of two possible classes based on spectroscopic data of the sample from the above description of the method for determining the binary classifier.
[0052] The invention will be explained below by way of example with reference to the accompanying drawings using preferred embodiments, wherein the features presented below can represent an aspect of the invention both individually and in combination. They show:
[0053] Fig. 1 in a) a schematic representation of two-dimensional spectroscopic data of a sample which are received as part of a method for determining a binary classifier according to a preferred embodiment of the invention, and in b) a schematic representation of a separation strength of features formed along the time dimension of the data in the feature space, and Fig. 2 a schematic representation of a linear discriminant function which, as part of a method for determining a binary classifier according to a preferred embodiment of the invention, separates linear combinations of the features formed along the time dimension of the data from one another into two classes.
[0054] Figure 1 shows on the left in Figure 1a) a schematic representation of two-dimensional spectroscopic data of a sample which are received in the context of a method for determining a binary classifier according to a preferred embodiment of the invention.
[0055] The measured spectroscopic data are time-resolved fluorescence emissions measured on hatching eggs on the third day of incubation. The sex of the hatching eggs was determined using PCR.
[0056] The time-resolved fluorescence emissions were recorded at a fluorescence excitation of 266 nm with the following parameters using the Boxcar measurement method:
[0057] Emission parameters: T m in = 0 ns; Tmax = 30 ns (discreditation = 1 ns);
[0058] Xmin = 340.14 nm; Xm ax = 720.60 nm (discreditation 0.5 nm).
[0059] The two-dimensional spectroscopic data of the sample received to determine the classifier are present in a two-dimensional data matrix A, where a row (aj1, . . . , a jn ), j = 1, . . . ,m of the data matrix comprises the time behavior and in particular the decay curves 10a for individual singular wavelengths or an averaged decay curve 10b for several directly adjacent singular wavelengths.
[0060]
[0061] When the data matrix A is represented graphically, the image shown in Figure 1 a) results, where the y-axis 12 corresponds to the wavelength dimension and the x-axis 14 to the time dimension. The decay curves 10a of individual singular wavelengths are shown, as well as the decay curves 10b averaged over the wavelength range 16.
[0062] In the preferred embodiment of the method for determining the binary classifier described below, after the two-dimensional data have been received, features Fl to F5 formed along the time dimension of the data are determined for several wavelengths and / or for several wavelength ranges.
[0063] The characteristics Fl to F5 are the following:
[0064] • Fl : statistical moments of the 2nd to 4th order of the data in the time dimension,
[0065] • F2: Coefficients of a best fit line of the data in the time dimension,
[0066] • F3 : Real coefficients of a Fourier transform of the data in the time dimension,
[0067] • F4: coefficients of a best fit line through the real coefficients of the Fourier transform determined for feature F3, and
[0068] • F5: Entropy of the data in the time dimension
[0069] Since the decay curves 10 are a function of time, they are also referred to as S(T) below. The decay curves 10 are received in an original, non-normalized form. The feature Fl is thus the standard deviation G, skewness y, and kurtosis co calculated for S(T).
[0070] To determine the features F2 to F5, the decay curves are converted into a normalized form SN(T), where S(T) has the mean g = 0 and the standard deviation o = 1.
[0071] The feature F2 is the coefficients a, b of the normal equation g(x) = ax + b for SN(T).
[0072] The feature F3 is the ascending ordered real coefficients of the fast Fourier transform FFT[SN(T)].
[0073] Feature F4 is the coefficients s, t of the normal equation f(x) = sx + t for the ascending real coefficients of the fast Fourier transform FFT[SN(T)].
[0074] The feature F5 is the entropy E [SN(T)].
[0075] Subsequently, linear combinations of the features Fl to F5, which are also referred to as profiles pr in the following, are formed according to pr = CiFi, where Ci is the respective coefficient of the feature Fi.
[0076] To determine the profiles, the features are analyzed with regard to their discrimination strength for the two classes. Figure 1b) shows the result of the analysis in feature space, using the decay curves 10a for singular wavelengths and the averaged decay curve 10b as examples. In the present embodiment, features with a discrimination strength below a predefined threshold are assigned a value of d = 0 in the linear combination, so that they are, in other words, eliminated, while the other features are assigned the coefficient value Ci = 1.
[0077] This procedure is illustrated here for the profile around 524.38 nm: For this purpose, individual spectra between 518.80 nm and 529.95 nm were analyzed using machine learning methods. It turns out that the features F1, F2, and F4 do not have sufficient discriminatory power for this profile. Further consideration of these features would worsen the classification hit rate. For features F3 and F5, the following values to be considered in the linear combination result:
[0078] F3 :
[0079] - Four Fourier transform coefficients: fi, f2, f?, fj at 523.82 nm
[0080] - Three Fourier transform coefficients: fs, fe, f? at 523.26 nm
[0081] - A Fourier transform coefficient: fs at 524.38 nm
[0082] F5:
[0083] - Entropy El at 518.80 nm
[0084] - Entropy E2 at 527.17 nm
[0085] - Entropy E3 at 529.95 nm
[0086] - Entropy E4 at 523.26 nm
[0087] The profile pr = Si=i c i^'i at the wavelength 524.38 nm is calculated using the following coefficients Ci
[0088] Cl = 0, C2 = 0, C3 = 1, C4 = 0 C5 = 1 according to
[0089] P r 524.38nm = c s(20 / i — 13 / 2 — 6 / 3 — 4.6 / 4 + 2, 8 / 5 — 6.3f6+ 1.7 / y + 2.5 / g) + C5(-8E1+ 7E2- 4.5£3+ 4.8£4) - 3.5
[0090] The value -3.5 also specifies that a classification rule is such that >0 applies to one class and <0 to the other. After this first step of the procedure, the classification results listed below can be achieved for the following exemplary profiles. The hit rates were verified using two-dimensional spectroscopic data from hatching eggs that were not used to train the classifier:
[0091] D denotes the value of the discriminant function for the profiles, and A denotes the accuracy of the profiles. The wavelength designation corresponds either to the individual wavelength of the profile or to the arithmetic mean of the initial and final values of the wavelength range.
[0092] In the next step of the process, a subset is selected from the identified profiles by analyzing the profiles for their discriminatory power for the two classes. This is done here using linear discriminant analysis. Figure 2 schematically shows how the profiles, represented as circles 18, are separated into two classes, Pi and P2, by a discriminant function 20 determined using linear discriminant analysis.
[0093] Taking into account this determined subset of profiles, which also includes the profile at 524.38 nm, a 100% hit rate is achieved in the second stage.
[0094] Reference symbol
[0095] 10a Decay curve for singular wavelength
[0096] 10b averaged decay curve over wavelength range 12 y-axis
[0097] 14 x-axis
[0098] 16 wavelength range
[0099] 18 Circle
[0100] 20 discriminant function Pi, P2 classes
Claims
Patent claims 1. A computer-implemented method for determining a binary classifier, wherein the classifier is configured to assign a sample to one of two possible classes (Pi, P2) on the basis of spectroscopic data of the sample, comprising the steps: Receiving two-dimensional spectroscopic data of the sample, the data comprising discrete values in a wavelength dimension (12) and a time dimension (14), Determining features Fl to F5 formed along the time dimension (14) of the data for a plurality of wavelengths and / or for a plurality of wavelength ranges (16), wherein the features • Fl : statistical moments of the 2nd to 4th order of the data in the time dimension, • F2: Coefficients of a best fit line of the data in the time dimension, • F3 : Real coefficients of a Fourier transform of the data in the time dimension, • F4: coefficients of a best fit line through the real coefficients of the Fourier transform determined for feature F3, and • F5: Entropy of the data in the time dimension include, Determining linear combinations of the features F1 to F5 for the plurality of wavelengths and / or for the plurality of wavelength ranges (16) by analyzing the features with regard to their separation strength for the two classes (Pi, P2), and determining a subset of the determined linear combinations by analyzing the linear combinations with regard to their separation strength for the two classes (Pi, P2).
2. The method according to claim 1, wherein the sample is a fertilized bird egg and the two classes (Pi, P2) represent a male sex and a female sex of the fertilized bird egg.
3. Method according to one of the preceding claims, wherein the received two-dimensional spectroscopic data are intrinsic fluorescence data of the sample and in particular intrinsic fluorescence data of the sample acquired by means of time-resolved laser-induced fluorescence spectroscopy (zLIF) and / or by means of time-correlated single photon counting (TCSPC).
4. Method according to one of the preceding claims, wherein for determining the features F2 to F5 the data in the time dimension (14) are present as normalized data such that a mean value of the data in the time dimension (14) is zero.
5. Method according to one of the preceding claims, wherein for determining the feature Fl the data in the time dimension (14) are present as non-normalized data.
6. Method according to one of the preceding claims, wherein the real coefficients of the Fourier transform of the data in the time dimension (14) of the feature F3 are ordered in ascending order and / or wherein the coefficients of the best-fit line are determined by the real coefficients of the Fourier transform determined for feature F3 on the basis of ascending order real coefficients.
7. Method according to one of the preceding claims, wherein the step of determining the linear combinations of the features F1 to F5 for the plurality of wavelengths and / or for the plurality of wavelength ranges (16) by analyzing the features with regard to their separation strength for the two classes (P1, P2) comprises defining a Coefficients of the linear combination as zero for features whose discrimination power is below a predefined threshold.
8. The method according to one of the preceding claims, wherein the step of determining the linear combinations of the features F1 to F5 for the plurality of wavelengths and / or for the plurality of wavelength ranges (16) comprises analyzing the features with regard to their separation strength for the two classes (Pi, P2); and / or wherein the step of determining the subset of the determined linear combinations by analyzing the linear combinations with regard to their separation strength for the two classes (Pi, P2) comprises analyzing by means of linear discriminant analysis.
9. Method according to the preceding claim, wherein in the analysis a discriminant function (20) and preferably the Fisher discriminant function and / or a hit rate of the determined classifier are used as a metric for the separation strength.
10. Computer-implemented method for assigning a sample to one of two possible classes (Pi, P2) on the basis of spectroscopic data of the sample, and in particular for assigning a fertilized bird egg to one of two possible sexes, comprising the steps Receiving two-dimensional spectroscopic data of the sample, the data comprising discrete values in a wavelength dimension (12) and a time dimension (14), and Applying a classifier to the received data, wherein the classifier was determined using the method according to one of claims 1 to 8.
11. Device for data processing comprising means for carrying out the method according to one of the preceding method claims.
12. A computer program product comprising instructions which, when executed by a computer, cause the computer to carry out the method according to one of the preceding method claims.
13. A computer-readable medium on which the computer program product according to the preceding claim is stored.