This study addresses the issue of milk geographical origin traceability by proposing a novel direct linear discriminant analysis (LDA) method named maximum uncertainty-based direct LDA with QR decomposition (MDLDA/QR). Conventional LDA often encounters problems, such as a singular or unstable estimation of the within-class scatter matrix when dealing with small-sample, high-dimensional spectral data. Maximum uncertainty LDA, via the maximum uncertainty covariance selection framework, effectively enhances the model’s robustness against data with noise. The QR decomposition algorithm achieves efficient dimensionality reduction by operating on smaller matrices; it first maximizes between-class separation and then incorporates within-class information, significantly improving computational efficiency while ensuring numerical stability. This work integrates the core concepts of these two strategies and applies them to milk sample data collected via portable near-infrared spectroscopy. After preprocessing the spectral data using Savitzky–Golay smoothing, the MDLDA/QR algorithm was directly employed for feature extraction and dimensionality reduction, thereby avoiding the potential information loss associated with traditional principal component analysis-based dimensionality reduction. Validation results based on the K-nearest neighbor classifier indicate that the MDLDA/QR model achieved an origin discrimination accuracy of 98.67%, significantly outperforming traditional methods, such as direct LDA combined with QR algorithm (94.67%), principal component analysis combined with LDA (89.33%), and partial least squares discriminant analysis (82.67%). Therefore, the proposed MDLDA/QR model provides a reliable strategy for swift and nondestructive authentication of milk origin, characterized by high robustness and computational efficiency.
Dong et al. (Tue,) studied this question.