Resumen
Machine learning is used widely in near-infrared spectroscopy (NIRS) for fruit qualification. However, the directly split training set used contains redundant samples, and errors may be introduced into the model. Euclidean distance-based and K-nearest neighbor-based instance selection (IS) methods are widely used to remove useless samples because of their accessibility. However, they either have high accuracy and low compression or vice versa. To compress the sample size while improving the accuracy, the least-angle regression (LAR) method was proposed for classification instance selection, and a discrimination experiment was conducted on a total of four origins of 952 apples. The sample sets were split into the raw training set and testing set; the optimal training samples were selected using the LAR-based instance selection (LARIS) method, and the four other selection methods were compared. The results showed that 26.9% of the raw training samples were selected using LARIS, and the model based on these training samples had the highest accuracy. Thus, the apple origin classification model based on LARIS can achieve the goal of high accuracy and compression and provide experimental support for the least-angle regression algorithm in classification instance selection.