ABSTRACT The integration of hyperspectral imaging (HSI) with machine learning enables non‐destructive prediction and visualization of food quality. However, multicollinearity and redundant features in spectral data can reduce model accuracy and increase computational time, emphasizing the need for key wavelength selection. In response, this study presents an inventive method combining a genetic algorithm (GA) with explainable artificial intelligence (XAI) to select key wavelengths for predicting apple dry matter content (DMC). A partial least squares regression (PLSR) model using the selected features outperformed recursive feature elimination (RFE) and competitive adaptive reweighted sampling (CARS), achieving a coefficient of determination ( R 2 ) of 0.46 and a root mean squared error (RMSE) of 0.70%. The approach was further applied to hyperspectral images to visualize pixelwise DMC distribution, providing spatial insights into fruit composition. Results demonstrate that integrating XAI with evolutionary feature selection offers a noninvasive, transparent, and efficient strategy for assessing and visualizing fruit quality.
Khatun et al. (2026) studied this question.