The invention discloses a terahertz time-domain
spectroscopy detection method for identifying millets in multiple producing areas, aiming at solving the problems of time and labor consumption, complex operation, destructiveness, higher
specialty for detection personnel and the like of a traditional method for identifying the producing areas of the millets. A terahertz time-domain
spectroscopy technology is combined with three
machine learning models of a
support vector machine (SVM), a
random forest (RF) and a
kernel extreme learning machine (KELM) to realize accurate identification of the production place of millet. A voting method, stacking and
Topsis-Stacking are respectively used for integrating SVM (
Support Vector Machine), RF (
Radio Frequency) and KELM models to analyze millet
spectral data, the method for integrating three models by using the
Topsis-Stacking method shows excellent classification performance on millet from five producing areas, the average accuracy, the F1
score and the Kappa on a prediction set all reach 100%, the average accuracy, the F1
score and the Kappa obviously exceed those of a
single model, a traditional voting method and the traditional stacking method, and the method has the advantages that the method is simple and easy to implement and has high practical value. And no parameter optimization is needed in the process. The method provided by the invention has the advantages of rapidness, no damage, safety and the like in the aspect of identifying millet from different producing areas, and a new technical approach is provided for grain safety and
quality control.