# Non-Destructive Measurement of Egg’s Haugh Unit by Vis-NIR with iPLS-Lasso Selection

^{*}

## Abstract

**:**

^{th}fusion model obtained the best performance with the minimum root mean of squared error of prediction (RMSEP) of 5.161, and performed the best among the general PLS model and other intervals-combined PLS models. This study provided a new, rapid, and reliable method for the non-destructive and in-site determination of egg’s freshness.

## 1. Introduction

_{2}O and CO

_{2}), and it leads to the air pocket volume increasing. Therefore, the changes occur not only in the internal physical and chemical indicators, but also on the shell surface of egg. However, the traditional physical-chemical methods to measure these changes have some disadvantages, such as time-consuming, destructive, and affecting secondary sales. Therefore, it is urgent to develop a rapid non-destructive detection method to identify and classify the quality of eggs.

_{2}detector for SW-NIR signal is not expensive and the practical applications prefer low-cost designs [17]. Thus, the spectrum in the range of visible to SWNIR should pay more attention to the measurement of egg’s freshness. Partial least square (PLS) was used most to develop the regression model to fit the attributes of samples, and interval PLS (iPLS) was proposed on the basis of piecewise modeling of spectral intervals and determination of the most informative interval range [18,19]. However, in a spectrum that is divided into several intervals, it is not possible to have only one interval correlated with the attributes while the rest intervals are not. If other intervals are integrated to develop the model, can the accuracy of model be improved? Furthermore, in some solutions, only using a single modeling method may make the model’s prediction unsatisfied with low accuracy or poor robustness in the prediction stage, even with complex non-linear modeling approaches [12,20,21]. In order to solve the problem of inaccurate prediction of a single model, some literatures adopt a fusion strategy to integrate several member models into a fusion model, which can further improve the performance of model and achieve a good result in practical applications [20,21,22,23].

## 2. Materials and Methods

#### 2.1. Sample Preparation

#### 2.2. Vis-NIR Spectroscopy Measurement

#### 2.3. Measurement of Egg’s Freshness

#### 2.4. Multivariate Data Analysis

#### 2.4.1. Spectral Pretreatments

#### 2.4.2. Interval Partial Least Square (iPLS)

#### 2.4.3. Selections by Lasso

**N**is the number of observations, and ${\widehat{y}}_{ij}$ is the output of member model.

**y**is the response at observation

_{i}**i**.

**λ**is a nonnegative regularization parameter corresponding to one value of Lambda. The parameters

**β**and

_{0}**β**are scalar and

**p**-vector, respectively. With re-weighting attributes for the potential indicators, Lasso can be derived from its utilization to fuse member models into a fusion model. It can weigh the importance of member models and select these with large weighting values for the final fusion model. As a result, Lasso can eliminate some irrelevant variables which have little influence on the final model and simplify the complexity of the model’s structure.

#### 2.4.4. Estimation of Model’s Performance

_{cv}(correlation coefficient of cross-validation) are calculated from the actual values

**y**and the value $\widehat{y}$ predicted by the fusion model

**F(x)**at the cross-validation stage of each member model. Similarly, RMSEP and Rp (correlation coefficient of prediction) are calculated in this way at the prediction stage.

#### 2.5. Software

## 3. Results and Discussion

#### 3.1. Changes in Egg’s Freshness

_{2}) penetrate through the eggshell, causing the loss of egg weight, the increase of acidity, and the change of albumen texture [2]. The thickness of the albumen layer is impacted by changes in ovomucin-lysozyme interaction during the aging process, and this change can be used to assess the freshness of egg by HU [27]. Thus, the HU is about the internal changes of compositions and protein structures. The physical -chemical attributes of the grouped eggs, which were assigned with a series of different storage times, were calculated the averaged/standard deviation values. The trend graphs of HU, yolk index, and weight loss rate were plotted with the change of the assigned days in Figure 3.

#### 3.2. Physical Parameters of Eggs

#### 3.3. Spectra of Eggs

_{2}. Thus, the penetrated spectrum involves these changes in chemical components, and it can be acted as an indicator of the degree of freshness change. Different from infrared spectroscopy, the visible-short near-infrared spectroscopy used in this work has a small number of fingerprints that can reflect the specific functional groups.

_{2}), and displacement in absorbance value can be associated with changes of structural protein during the storage time [2,10]. Other valleys in egg’s spectra are the results of the overlapped or the combination absorptions of the H-contained groups (C-H, O-H, S-H, N-H stretching), such as moisture, proteins, fatty acid, and CO

_{2}et al. Obviously, by naked-eye the spectral absorptions are correlated to the functional groups in sample’s components, but the component’s concentration could not be given out through direct observation of NIR spectral profile due to its severely overlapped information and multivariate data modeling analysis is needed.

#### 3.4. Spectral Preprocess for PLS Models

#### 3.5. Development of iPLS Models

#### 3.6. Lasso Selection and Regression

**λ**controlled the degree of coefficient’s restraint and let

**λ**be large enough to make some coefficients zero. In order to avoid the interference of artificial preferred settings, the average and standard error of sum squared residual (SSR) in the Lasso regression models were cross-validated with 5-fold in the calibration stage. In this work, the tuning parameter

**λ**was adaptively obtained by obeying the rule of a minimum of RMSE in the developed Lasso model.

#### 3.7. Comparison and Discussions

^{a}model, because it did not select any useful spectral wavelengths from the whole spectral region, which might involve some noises that caused the model to be unreliable, and weakened the predictive performance with an RMSEP of 5.584 in the prediction set. In the development of iPLS model, the spectral region was attempted to divide into 2 to 40 intervals, and on the basis of each interval a series of PLS models were systemically built to compare their performances. When the spectral region was divided into six intervals, PLS built on the 4th interval obtained the best performance than others, and the RMSEP in the prediction set was 5.757. By comparison with PLS, iPLS just used 16.67% spectral wavelengths (about 340 variables) in the range of 777–848 nm, where it was the informative spectra to reflect the internal attributes of samples in previous work [10,11], but the limited spectral region limited their access to more spectral information of inner compositions [18], and thus it performed not better than the PLS model.

^{th}iPLS obtained the lowest RMSECV of 6.284 among these intervals in the process of optimizing iPLS model, as Figure 7 depicted. The selected intervals distributed over the entire spectral region, and their distribution was relatively dispersed. They were distributed in the spectral range of 642–728 nm, 762–779 nm, 811–844 nm, and 968–983 nm, respectively, and these spectral regions related to 2xN-H stretching +2x amide I (protein) or C-H, N-H stretching third overtone (ArNH

_{2}) [5,19,29], as described in Section 3.3. However, the same combination of the above selected spectral intervals was used to construct the PLS-s1 model, which is equal to the synergy interval PLS but without optimization of the interval’s combination [18]. Its performance turned worse with an RMSEP of 5.595, close to the optimal PLS model based on the full spectral region. It indicates the selected intervals contain useful spectral information about the inner compositions, but they are not suitable to directly develop the calibration model [18,31]. Furthermore, the stacked iPLS model (PLS-s2) was developed as descripted in the study [12,19], and it acquired the worst performance among all models.

## 4. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Sim, J.S. The Return of w3 Fatty Acids into the Food Supply. In Designer Eggs and Their Nutritional and Functional Significance; Simopoulos, A.P., Ed.; World Rev Nutr Diet: Basel, Switzerland, 1998; Volume 83, pp. 89–101. [Google Scholar]
- Karoui, R.; Kemps, B.; Bamelis, F.; De Ketelaere, B.; Decuypere, E.; De Baerdemaeker, J. Methods to evaluate egg freshness in research and industry: A review. Eur. Food Res. Technol.
**2006**, 222, 727–732. [Google Scholar] [CrossRef] - Dutta, R.; Hines, E.L.; Gardner, J.W.; Udrea, D.D.; Boilot, P. Non-destructive egg freshness determination: An electronic nose based approach. Meas. Sci. Technol.
**2003**, 14, 190–198. [Google Scholar] [CrossRef][Green Version] - Lin, H.; Zhao, J.; Sun, L.; Chen, Q.; Zhou, F. Freshness measurement of eggs using near infrared (NIR) spectroscopy and multivariate data analysis. Innov. Food Sci. Emerg. Technol.
**2011**, 12, 182–186. [Google Scholar] [CrossRef] - Suktanarak, S.; Teerachaichayut, S. Non-destructive quality assessment of hens’ eggs using hyperspectral images. J. Food Eng.
**2017**, 215, 97–103. [Google Scholar] [CrossRef] - Liu, Y.; Ren, X.; Yu, H.; Cheng, Y.; Guo, Y.; Yao, W.; Xie, Y. Non-destructive and online egg freshness assessment from the egg shell based on Raman spectroscopy. Food Control
**2020**, 118, 107426. [Google Scholar] [CrossRef] - Kertész, I.; Zsom-Muha, V.; András, R.; Horváth, F.; Németh, C.; Felföldi, J. Development of a Novel Acoustic Spectroscopy Method for Detection of Eggshell Cracks. Molecules
**2021**, 26, 4693. [Google Scholar] [CrossRef] - Sun, L.; Yuan, L.-M.; Cai, J.-R.; Lin, H.; Zhao, J.-W. Egg Freshness on-Line Estimation Using Machine Vision and Dynamic Weighing. Food Anal. Methods
**2015**, 8, 922–928. [Google Scholar] [CrossRef] - Zhang, W.; Pan, L.; Tu, S.; Zhan, G.; Tu, K. Non-destructive internal quality assessment of eggs using a synthesis of hyperspectral imaging and multivariate analysis. J. Food Eng.
**2015**, 157, 41–48. [Google Scholar] [CrossRef] - Cruz-Tirado, J.P.; da Silva Medeiros, M.L.; Barbin, D.F. On-line monitoring of egg freshness using a portable NIR spectrometer in tandem with machine learning. J. Food Eng.
**2021**, 306, 110643. [Google Scholar] [CrossRef] - Loffredi, E.; Grassi, S.; Alamprese, C. Spectroscopic approaches for non-destructive shell egg quality and freshness evaluation: Opportunities and challenges. Food Control
**2021**, 129, 108255. [Google Scholar] [CrossRef] - Yuan, L.-M.; Mao, F.; Chen, X.; Li, L.; Huang, G. Non-invasive measurements of ‘Yunhe’ pears by vis-NIRS technology coupled with deviation fusion modeling approach. Postharvest Biol. Technol.
**2020**, 160, 111067–111073. [Google Scholar] [CrossRef] - Coronel-Reyes, J.; Ramirez-Morales, I.; Fernandez-Blanco, E.; Rivero, D.; Pazos, A. Determination of egg storage time at room temperature using a low-cost NIR spectrometer and machine learning techniques. Comput. Electron. Agric.
**2018**, 145, 1–10. [Google Scholar] [CrossRef][Green Version] - Syduzzaman, M.; Rahman, A.; Alin, K.; Fujitani, S.; Kashimori, A.; Suzuki, T.; Ogawa, Y.; Kondo, N. Noninvasive quantification of yolk content using Vis-NIR spectroscopy and its effect on hatching time and gender of broiler chicken. Eng. Agric. Environ. Food
**2019**, 12, 289–296. [Google Scholar] [CrossRef] - Puertas, G.; Vázquez, M. UV-VIS-NIR spectroscopy and artificial neural networks for the cholesterol quantification in egg yolk. J. Food Compos. Anal.
**2020**, 86, 103350. [Google Scholar] [CrossRef] - Liu, M.; Yao, L.; Wang, T.; Li, J.; Yu, C. Rapid determination of egg yolk contamination in egg white by VIS spectroscopy. J. Food Eng.
**2014**, 124, 117–121. [Google Scholar] [CrossRef] - Capitán-Vallvey, L.F.; Palma, A.J. Recent developments in handheld and portable optosensing—A review. Anal. Chim. Acta
**2011**, 696, 27–46. [Google Scholar] [CrossRef] - Norgaard, L.; Saudland, A.; Wagner, J.; Nielsen, J.P.; Munck, L.; Engelsen, S.B. Interval partial least-squares regression (iPLS): A comparative chemometric study with an example from near-infrared spectroscopy. Appl. Spectrosc.
**2000**, 54, 413–419. [Google Scholar] [CrossRef] - Poerio, D.V.; Brown, S.D. Stacked interval sparse partial least squares regression analysis. Chemometr. Intell. Lab.
**2017**, 166, 49–60. [Google Scholar] [CrossRef] - Ye, H.; Yuan, L.-M.; Zhang, H.-N.; Li, L.-M. Rapid Measurement of the Polyphenol Content in Fruit-Wine by Near Infrared Spectroscopy Combined with Consensus Modeling Approach. Spectrosc. Spect. Anal.
**2020**, 40, 777–781. [Google Scholar] [CrossRef] - Yuan, L.-m.; Mao, F.; Huang, G.; Chen, X.; Wu, D.; Li, S.; Zhou, X.; Jiang, Q.; Lin, D.; He, R. Models fused with successive CARS-PLS for measurement of the soluble solids content of Chinese bayberry by vis-NIRS technology. Postharvest Biol. Technol.
**2020**, 169, 111308–111315. [Google Scholar] [CrossRef] - Modak, S.K.S.; Jha, V.K. Multibiometric fusion strategy and its applications: A review. Inf. Fusion
**2019**, 49, 174–204. [Google Scholar] [CrossRef] - Wang, H.-P.; Chen, P.; Dai, J.-W.; Liu, D.; Li, J.-Y.; Xu, Y.-P.; Chu, X.-L. Recent advances of chemometric calibration methods in modern spectroscopy: Algorithms, strategy, and related issues. TrAC Trends Anal. Chem.
**2022**, 153, 116648. [Google Scholar] [CrossRef] - Tibshirani, R. Regression shrinkage and selection via the Lasso. J. R. Stat. Soc.
**1996**, 58, 267–288. [Google Scholar] [CrossRef] - Friedman, J.; Hastie, T.; Tibshirani, R. Regularization Paths for Generalized Linear Models via Coordinate Descent. J. Stat. Softw.
**2010**, 33, 1–22. [Google Scholar] [CrossRef][Green Version] - Yuan, L.-M.; Cai, J.-R.; Sun, L.; Han, E.; Ernest, T. Nondestructive Measurement of Soluble Solids Content in Apples by a Portable Fruit Analyzer. Food Anal. Methods
**2016**, 9, 785–794. [Google Scholar] [CrossRef] - Haugh, R.R. A New Method for Determining the Quality of an Egg; US Egg Poultry: Tucker, GA, USA, 1937; pp. 27–49. [Google Scholar]
- Wang, Y.; Wang, Z.; Shan, Y. Assessment of the relationship between ovomucin and albumen quality of shell eggs during storage. Poult. Sci.
**2019**, 98, 473–479. [Google Scholar] [CrossRef] - Yuan, L.-M.; You, L.; Yang, X.; Chen, X.; Huang, G.; Chen, X.; Shi, W.; Sun, Y. Consensual Regression of Soluble Solids Content in Peach by Near Infrared Spectroscopy. Foods
**2022**, 11, 1095. [Google Scholar] [CrossRef] - Ye, P.; Ji, G.; Yuan, L.-M.; Li, L.; Chen, X.; Karimidehcheshmeh, F.; Chen, X.; Huang, G. A Sparse Classification Based on a Linear Regression Method for Spectral Recognition. Appl. Sci.
**2019**, 9, 2053. [Google Scholar] [CrossRef][Green Version] - Nicolai, B.M.; Beullens, K.; Bobelyn, E.; Peirs, A.; Saeys, W.; Theron, K.I.; Lammertyn, J. Nondestructive measurement of fruit and vegetable quality by means of NIR spectroscopy: A review. Postharvest Biol. Technol.
**2007**, 46, 99–118. [Google Scholar] [CrossRef]

**Figure 8.**The selected intervals in iPLS-L26 fusion model. The downward arrows indicates the selected intervals by the Lasso regression in the present division of spectral intervals.

**Figure 9.**The scatter plot of the measured versus the predicted values by iPLS-L26 fusion model for egg’s HU.

Measurements | Datasets | SN ^{a} | Range | Mean | SD ^{b} | CV ^{c} (%) |
---|---|---|---|---|---|---|

Haugh unit (HU) | Calibration set | 69 | 57.8~91.3 | 75.2 | 8.6 | 11.44 |

Prediction set | 34 | 56.3~81.6 | 73.9 | 8.1 | 11.02 |

^{a}: the number of samples; SD

^{b}: standard deviation; CV

^{c}: coefficient of variation.

Detection Indicator | Pre-Process | LVs | Calibration Set | Prediction Set | ||||
---|---|---|---|---|---|---|---|---|

RMSECV | r_{cv} | Bias | RMSEP | r_{p} | Bias | |||

Haugh unit | MSC | 8 | 5.673 | 0.737 | 0.000 | 5.589 | 0.757 | 0.295 |

SNV | 8 | 5.672 | 0.737 | 0.001 | 5.587 | 0.757 | 0.276 | |

D1st+S-G | 7 | 5.915 | 0.699 | −0.106 | 6.107 | 0.714 | 1.277 | |

None | 11 | 5.751 | 0.739 | −0.042 | 5.584 | 0.757 | 1.427 |

Models | The Selected Intervals | Calibration Set | Prediction Set | ||||
---|---|---|---|---|---|---|---|

RMSECV | r_{cv} | Bias | RMSEP | r_{p} | Bias | ||

PLS ^{a} | 1/1 | 5.751 | 0.739 | −0.042 | 5.584 | 0.757 | 1.427 |

iPLS ^{b} | 4^{th}/6 | 5.517 | 0.744 | 0.001 | 5.757 | 0.73 | −0.002 |

iPLS-L11 ^{c} | 10/11 | 4.829 | 0.812 | −0.000 | 5.323 | 0.808 | 1.881 |

iPLS-L16 | 5/16 | 4.824 | 0.814 | 0.000 | 5.744 | 0.728 | −0.159 |

iPLS-L22 | 14/22 | 4.805 | 0.839 | 0.000 | 5.189 | 0.827 | 0.745 |

iPLS-L26 | 10/26 | 4.849 | 0.807 | 0.000 | 5.161 | 0.832 | 0.728 |

iPLS-L30 | 8/29 | 4.815 | 0.832 | 0.000 | 5.641 | 0.751 | 0.594 |

PLS-s1 ^{d} | 10/26 | 5.821 | 0.736 | −0.185 | 5.595 | 0.755 | 1.309 |

PLS-s2 ^{e} | 26/26 | 6.246 | 0.712 | 0.120 | 6.707 | 0.734 | 1.418 |

^{a}: the general partial least squares regression model with the optimal LV of 11; iPLS

^{b}: the interval partial least squares regression model with the 4th intervals at the division of 6; iPLS-L

^{c}: the fusion model on the basis of iPLS member models by Lasso regression; PLS-s1

^{d}: the developed PLS model with optimal LV of 6 based on the spectra selected from the iPLS-L26 fusion model; PLS-s2

^{e}: the stacked fusion model based on each iPLS member model at the division of 26 intervals.

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Yuan, L.; Fu, X.; Yang, X.; Chen, X.; Huang, G.; Chen, X.; Shi, W.; Li, L.
Non-Destructive Measurement of Egg’s Haugh Unit by Vis-NIR with iPLS-Lasso Selection. *Foods* **2023**, *12*, 184.
https://doi.org/10.3390/foods12010184

**AMA Style**

Yuan L, Fu X, Yang X, Chen X, Huang G, Chen X, Shi W, Li L.
Non-Destructive Measurement of Egg’s Haugh Unit by Vis-NIR with iPLS-Lasso Selection. *Foods*. 2023; 12(1):184.
https://doi.org/10.3390/foods12010184

**Chicago/Turabian Style**

Yuan, Leiming, Xueping Fu, Xiaofeng Yang, Xiaojing Chen, Guangzao Huang, Xi Chen, Wen Shi, and Limin Li.
2023. "Non-Destructive Measurement of Egg’s Haugh Unit by Vis-NIR with iPLS-Lasso Selection" *Foods* 12, no. 1: 184.
https://doi.org/10.3390/foods12010184