Nondestructive Prediction of Eggshell Thickness Using NIR Spectroscopy and Machine Learning with Explainable AI
Md Wadud Ahmed, S. Sharar Alam, Alin Khaliduzzaman, J.L. Emmert, Mohammed Kamruzzaman
Abstract
The eggshell protects internal contents, supplies calcium for embryos, and aids embryonic respiration. This study assessed near-infrared (NIR) spectroscopy and machine learning techniques with explainable artificial intelligence for measuring fast, accurate, and real-time eggshell thickness determination. Partial least-squares regression (PLSR), random forest, K-nearest neighbors, and support vector regression calibration models were developed at full wavelength (1300–2525 nm). The PLSR model demonstrated superior and stable predictive performance, achieving a coefficient of determination ( R p 2 ) of 0.867, and root-mean-square error of prediction (RMSEP) of 0.015 mm. A new PLSR model using only five important variables selected by competitive adaptive reweighted sampling showed promising results with an R p 2 of 0.910 and an RMSEP of 0.012 mm. The Shapley additive explanation of the CARS-PLSR model revealed that the wavelengths related to protein, moisture, and lipids are crucial for NIR spectroscopic prediction of eggshell thickness.