Fitting prediction method for spectral data of multi-sensor portable near-infrared spectrometer

By dividing the spectral data of a multi-sensor portable near-infrared spectrometer into small bands and using multiple data processing methods for prediction and analysis, the problem of low prediction accuracy caused by large spectral data and the increase in the number of sensors is solved, and higher prediction accuracy and model stability are achieved.

CN114839158BActive Publication Date: 2025-04-29四川启睿克科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210474784.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-04-29
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

Due to the large amount of spectral data and the increase in the number of sensors, multi-sensor portable near-infrared spectrometers have different spectral data weights and poor model robustness and stability, which affects the accuracy of spectral prediction.

Method used

By dividing the spectral data into small band data according to the sensor model, and using different data processing methods (such as single-index modeling of the minimum root mean square error, single-index modeling of the highest prediction accuracy and double-index modeling of the highest prediction accuracy and double-index modeling of the minimum root mean square error), the component prediction value of the sample to be tested is finally obtained through data fitting.

Benefits of technology

The accuracy of spectral data prediction of multi-sensor portable near-infrared spectrometer is improved, the robustness and stability of the model are enhanced, and the problem of low accuracy of spectral data prediction is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114839158B_ABST
    Figure CN114839158B_ABST
Patent Text Reader

Abstract

The invention discloses a fitting prediction method for spectral data of a multi-sensor portable near-infrared spectrometer, which relates to a portable near-infrared spectrometer. The spectral data is divided according to sensor models to obtain K small-band spectral data, and then different small-band spectral data are processed in different data processing modes to obtain different component prediction values, and then the different component prediction values ​​are fitted to obtain the final prediction value of the component of the sample to be tested, thereby solving the problem of the prediction accuracy of the spectral data of the multi-sensor portable near-infrared spectrometer. The invention is suitable for the multi-sensor portable near-infrared spectrometer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a portable near-infrared spectrometer, in particular to a fitting prediction method for spectral data of a multi-sensor portable near-infrared spectrometer. Background Art

[0002] In recent years, near-infrared spectroscopy analysis technology has developed rapidly and has been applied in many fields such as chemical industry, pharmaceutical industry, military industry, food, etc. Near-infrared spectroscopy technology belongs to molecular spectroscopy technology, which can show the composition and properties of substances at the molecular level. It has achieved very high benefits in terms of both economic and social impact and has great development potential.

[0003] However, currently most material composition and property information detection is mainly carried out using large laboratory near-infrared spectroscopic instruments. Although these methods are quantitative, accurate and highly sensitive, the equipment required is bulky and expensive, the sample preparation time is long and the sample preparation method is strict. The detection equipment and sample preparation require professional operation, the detection environment is fixed, and the analysis time is long. They are not suitable for on-site detection and are not easy to promote and use.

[0004] With the development of portable near-infrared spectroscopy technology, the mainstream large-scale near-infrared spectrometers in the market are developing towards small size, low price and portable. However, portable near-infrared spectrometers are limited by sensor technology. The band range covered by single-sensor portable near-infrared devices is very limited, the stability of the collected spectral data is poor, and the spectral data is prone to offset, which can easily lead to unstable prediction results and low accuracy. In order to increase the sensor band coverage and improve the application scenarios of portable near-infrared spectrometers, multi-sensor portable near-infrared spectrometers have emerged. Since the magnitude of spectral data collected by each sensor in a multi-sensor portable near-infrared spectrometer is not the same, the use of conventional spectral data processing methods for prediction and analysis is likely to cause differences in spectral data weights, thereby affecting the prediction accuracy of the spectral model; at the same time, due to the increase in the number of sensors, the amount of spectral data has also been greatly increased. The large amount of data will seriously hinder the efficiency of portable near-infrared spectral analysis technology. At the same time, the spectral data collected by different sensors are all processed in the same way, and the robustness and stability of the spectral model are poor, which will also affect the spectral prediction accuracy. Summary of the invention

[0005] The technical problem solved by the present invention is to provide a fitting prediction method for spectral data of a multi-sensor portable near-infrared spectrometer, so as to solve the problem of accuracy in prediction of spectral data of a multi-sensor portable near-infrared spectrometer.

[0006] The technical solution adopted by the present invention to solve the above technical problem is: the fitting prediction method of spectral data of a multi-sensor portable near-infrared spectrometer comprises the following steps:

[0007] S01. Acquire a certain amount of spectral data;

[0008] S02, dividing the spectral data according to the sensor model to obtain K small-band spectral data, where K is the same as the sensor model;

[0009] S03, different small band spectral data are processed in different ways to obtain different component prediction values;

[0010] S04. Perform data fitting on the predicted values ​​of different components to obtain the final predicted values ​​of the components of the sample to be tested.

[0011] Furthermore, if the multi-sensor portable near-infrared spectrometer has a plurality of sensors of the same model, then, in step S01, it also includes performing averaging processing on the spectral data collected by the sensors of the same model in the same set of spectral data.

[0012] Furthermore, the different data processing methods include minimum root mean square error single-indicator modeling prediction, maximum prediction accuracy single-indicator modeling prediction, and maximum prediction accuracy and minimum root mean square error dual-indicator modeling prediction.

[0013] Furthermore, the minimum mean square error single index modeling prediction includes the following steps:

[0014] S101, dividing all small-band spectral data into training sets;

[0015] S102, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using the partial least squares method;

[0016] S103, repeating step S102 to obtain multiple spectral models;

[0017] S104, obtaining the RMSECV value corresponding to each spectral model through leave-one-out cross-validation, and selecting the spectral model with the smallest RMSECV value as the first final model;

[0018] S105. Use the first final model to perform prediction to obtain a first predicted value of the sample component.

[0019] Furthermore, the single-index modeling prediction with the highest prediction accuracy includes the following steps:

[0020] S201, dividing the small-band spectral data into a training set and a validation set;

[0021] S202, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using the partial least squares method;

[0022] S203, repeat step S202 to obtain multiple spectral models;

[0023] S204, predicting the validation set spectral data, calculating the prediction accuracy of each model for the validation set, and selecting the spectral model with the highest prediction accuracy as the second final model;

[0024] S205. Use the second final model to make predictions to obtain second predicted values ​​of sample components.

[0025] Furthermore, the dual-index modeling prediction of the highest prediction accuracy and the minimum root mean square error includes the following steps:

[0026] S301, dividing the small-band spectral data into a training set and a validation set;

[0027] S302, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using partial least squares method;

[0028] S303, repeat step S202 to obtain multiple spectral models;

[0029] S304, predicting the validation set spectral data, calculating the prediction accuracy of each model for the validation set, and selecting a model with an accuracy higher than a first threshold;

[0030] S305, obtaining the RMSECV value corresponding to the model whose prediction accuracy is higher than the first threshold through leave-one-out cross validation, and selecting the spectral model with the smallest RMSECV value as the third final model;

[0031] S306. Use the third final model to make predictions to obtain third predicted values ​​of sample components.

[0032] Furthermore, the first threshold is 0.85 times the highest prediction accuracy value among the multiple spectral models.

[0033] Furthermore, the dual-index modeling prediction of the highest prediction accuracy and the minimum root mean square error includes the following steps:

[0034] S401, dividing the small-band spectral data into a training set and a validation set;

[0035] S402, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using partial least squares method;

[0036] S403, repeat step S402 to obtain multiple spectral models;

[0037] S404, obtaining the RMSECV value corresponding to each spectral model through leave-one-out cross validation, and selecting the spectral model whose RMSECV value is less than the second threshold;

[0038] S405, predicting the validation set spectral data, calculating the prediction accuracy of each spectral model whose RMSECV value is less than the second threshold, and selecting the spectral model with the highest prediction accuracy as the fourth final model;

[0039] S406. Use the fourth final model to make predictions to obtain fourth predicted values ​​of the sample components.

[0040] Furthermore, the second threshold is 1.2 times the minimum value of the RMSECV values ​​corresponding to the multiple spectral models.

[0041] Beneficial effects of the present invention: The fitting and prediction method for spectral data of a multi-sensor portable near-infrared spectrometer of the present invention obtains K small-band spectral data by dividing the spectral data according to the sensor model, and then obtains different component prediction values ​​for different small-band spectral data according to different data processing methods, and then performs data fitting on the different component prediction values ​​to obtain the final prediction value of the component of the sample to be tested, thereby solving the problem of the prediction accuracy of spectral data of a multi-sensor portable near-infrared spectrometer. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Attached Figure 1 It is a schematic flow chart of a fitting prediction method for spectral data of a multi-sensor portable near-infrared spectrometer of the present invention.

[0043] Attached Figure 2 It is a schematic diagram of sensor distribution of a multi-sensor portable near-infrared spectrometer in the fitting prediction method for spectral data of a multi-sensor portable near-infrared spectrometer of the present invention, wherein 1, 2, 3, 4, 5 and 6 all represent sensors, and 1 and 2 belong to the same model, 3 and 4 belong to the same model, and 5 and 6 belong to the same model. DETAILED DESCRIPTION

[0044] The fitting prediction method of the spectral data of the multi-sensor portable near-infrared spectrometer of the present invention is as follows Figure 1 As shown, the following steps are included:

[0045] S01. Acquire a certain amount of spectral data;

[0046] Specifically, if the multi-sensor portable near-infrared spectrometer has multiple sensors of the same model, then, in step S01, it also includes averaging the spectral data collected by the sensors of the same model in the same group of spectral data. Since the band range of sensors of the same model is the same and the order of magnitude of the collected light intensity is the same, the spectral data collected by the sensors of the same model in the multiple sensors are matched one by one and their averages are calculated, which greatly simplifies the amount of spectral data while retaining the spectral characteristics and improves the efficiency of spectral analysis.

[0047] S02, dividing the spectral data according to the sensor model to obtain K small-band spectral data, where K is the same as the sensor model;

[0048] Specifically, different types of sensors collect light intensities of different orders of magnitude and different wavelength ranges. If the same spectral analysis method is used to model them, the effect will be poor and the robustness and stability will also be poor. Therefore, the present invention segments the spectral data.

[0049] S03, different small band spectral data are processed in different ways to obtain different component prediction values;

[0050] Specifically, the different data processing methods include minimum root mean square error single-indicator modeling prediction, maximum prediction accuracy single-indicator modeling prediction, and maximum prediction accuracy and minimum root mean square error dual-indicator modeling prediction.

[0051] The minimum mean square error single index modeling prediction comprises the following steps:

[0052] S101, dividing all small-band spectral data into training sets;

[0053] S102, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using the partial least squares method;

[0054] S103, repeating step S102 to obtain multiple spectral models;

[0055] S104, obtaining the RMSECV value corresponding to each spectral model through leave-one-out cross-validation, and selecting the spectral model with the smallest RMSECV value as the first final model;

[0056] S105. Use the first final model to perform prediction to obtain a first predicted value of the sample component.

[0057] The single-indicator modeling prediction with the highest prediction accuracy includes the following steps:

[0058] S201, dividing the small-band spectral data into a training set and a validation set;

[0059] S202, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using the partial least squares method;

[0060] S203, repeating step S202 to obtain multiple spectral models;

[0061] S204, predicting the validation set spectral data, calculating the prediction accuracy of each model for the validation set, and selecting the spectral model with the highest prediction accuracy as the second final model;

[0062] S205. Use the second final model to make predictions to obtain second predicted values ​​of sample components.

[0063] The first method of the dual-index modeling prediction of the highest prediction accuracy and the minimum root mean square error includes the following steps:

[0064] S301, dividing the small-band spectral data into a training set and a validation set;

[0065] S302, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using partial least squares method;

[0066] S303, repeat step S202 to obtain multiple spectral models;

[0067] S304, predicting the validation set spectral data, calculating the prediction accuracy of each model for the validation set, and selecting a model with an accuracy higher than a first threshold, where the first threshold is 0.85 times the highest prediction accuracy value among the multiple spectral models;

[0068] S305, obtaining the RMSECV value corresponding to the model whose prediction accuracy is higher than the first threshold through leave-one-out cross validation, and selecting the spectral model with the smallest RMSECV value as the third final model;

[0069] S306. Use the third final model to make predictions to obtain third predicted values ​​of sample components.

[0070] The second method of the dual-index modeling prediction of the highest prediction accuracy and the minimum root mean square error includes the following steps:

[0071] S401, dividing the small-band spectral data into a training set and a validation set;

[0072] S402, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using the partial least squares method;

[0073] S403, repeat step S402 to obtain multiple spectral models;

[0074] S404, obtaining the RMSECV value corresponding to each spectral model through leave-one-out cross validation, and selecting a spectral model whose RMSECV value is less than a second threshold, where the second threshold is 1.2 times the minimum value of the RMSECV values ​​corresponding to the multiple spectral models;

[0075] S405, predicting the validation set spectral data, calculating the prediction accuracy of each spectral model whose RMSECV value is less than the second threshold, and selecting the spectral model with the highest prediction accuracy as the fourth final model;

[0076] S406. Use the fourth final model to make predictions to obtain fourth predicted values ​​of the sample components.

[0077] S04. Perform data fitting on the predicted values ​​of different components to obtain the final predicted values ​​of the components of the sample to be tested.

[0078] Example:

[0079] Take a portable near-infrared spectrometer containing three different types of sensors and two sensors of the same type, for a total of six sensors, as an example. The six sensors are arranged as shown in the attached figure. Figure 2 As shown, sensor 1 and sensor 2 are of the same model, and are centrally symmetrical in position, with a band range of 1255nm-1550nm, sensor 3 and sensor 4 are of the same model, and are centrally symmetrical in position, with a band range of 1555nm-1850nm, sensor 5 and sensor 6 are of the same model, and are centrally symmetrical in position, with a band range of 1855nm-2150nm, and the wavelength points of these 6 sensors are distributed in a wavelength-equalized manner, and the number of detection wavelength points of each sensor is 60. If the spectral data is not processed and data analysis is performed directly, since the number of the same sensors is 2, the prior art needs to increase the light intensity value points in the spectral data with a spectral data band range of 1255nm-1550nm and containing 60 light intensity value points to 120. Therefore, in the prior art, the wavelength range of the portable near-infrared spectrometer is 1255nm-2150nm, with a total of 360 light intensity values.

[0080] The fitting prediction method of spectral data of a multi-sensor portable near-infrared spectrometer of the present invention is applied to the portable near-infrared spectrometer of the above six sensors, comprising the following steps:

[0081] S01, obtaining a certain amount of spectral data, and performing averaging processing on the spectral data collected by the same type of sensor in the same group of spectral data;

[0082] Specifically, a certain number is taken as 500, that is, 500 sets of spectral data are obtained, and the spectral data collected by the same type of sensor in the same set of spectral data are averaged as follows: Since sensor 1 and sensor 2 are of the same type, sensor 3 and sensor 4 are of the same type, and sensor 5 and sensor 6 are of the same type, the spectral data processing of sensor 1 and sensor 2 is used for explanation. Assume that the spectral data of sensor 1 is A=(P 1 , P 2 , P 3 ,......,P 60 ), the spectral data of sensor 2 is B=(Q 1 , Q 2 , Q 3 ,......,Q 60 ), then the unified spectral data obtained after averaging is Similarly, the spectral data of sensor 3 and sensor 4 are averaged, and the spectral data of sensor 5 and sensor 6 are averaged. After this processing, there are only 180 light intensity points in the same set of spectral data, that is, the amount of the same set of spectral data is simplified to half of the original data amount. At the same time, the characteristic information of each sensor is also retained. Further, the light intensity value in the spectral data is made close to the light intensity value collected by the sensor, which is convenient for analysis. Thus, 500 sets of simplified spectral data are obtained.

[0083] S02, dividing the spectral data according to the sensor model to obtain K small-band spectral data, where K is the same as the sensor model;

[0084] Specifically, since the six portable near-infrared spectrometers have three types of sensors, K is equal to three, so the simplified spectral data is divided into three small bands according to the different types of sensors, namely the first small band 1255nm-1550nm, the second small band 1555nm-1850nm, and the third small band 1855nm-2150nm. Thus, the 500 groups of simplified spectral data are divided into 500 groups of first small band spectral data, 500 groups of second small band spectral data, and 500 groups of third small band spectral data.

[0085] S03, different small band spectral data are processed in different ways to obtain different component prediction values;

[0086] Specifically, for 500 groups of the first small band spectral data, the minimum root mean square error single indicator modeling and prediction processing method is adopted; for 500 groups of the second small band spectral data, the highest prediction accuracy single indicator modeling and prediction processing method is adopted; for 500 groups of the third small band spectral data, the prediction accuracy and minimum root mean square error dual indicator modeling and prediction processing method is adopted.

[0087] The root mean square error is generated by cross-validation using the leave-one-out method, and its expression is as follows:

[0088] That is, there are H sample data in the training set, the number of samples is recorded as Xi, and the corresponding data is recorded as y i , each time a sample Xi is taken out, the remaining H-1 sample data is used to build a model, and the predicted value of the sample Xi is predicted value, predict each sample, and then calculate the root mean square error of all predicted values ​​to get the RMSECV value.

[0089] The prediction accuracy is calculated as follows: predict a total of H spectral data. If the deviation between the predicted value and the calibrated value is within the tolerance range, the prediction is considered correct. The total number of samples with correct predictions is S, and the prediction accuracy T is:

[0090] For 500 sets of first small band spectral data, the minimum mean square error single index modeling prediction processing method is adopted, which specifically includes the following steps:

[0091] S101, dividing all small-band spectral data into training sets;

[0092] Specifically, 500 sets of first small band spectral data are used as training sets.

[0093] S102, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using the partial least squares method;

[0094] Specifically, the Gaussian smoothing window width is set to an odd number in the interval [1, 11], the detrending order is set to an integer in the interval [1, 4], and the number of principal components is set to an integer in the interval [1, 15].

[0095] S103, repeating step S102 to obtain multiple spectral models;

[0096] Specifically, there are 6×4×15=360 spectral models in total, where 6 refers to an odd number from 1 to 11.

[0097] S104, obtaining the RMSECV value corresponding to each spectral model through leave-one-out cross-validation, and selecting the spectral model with the smallest RMSECV value as the first final model;

[0098] Specifically, the RMSECV value is calculated using the root mean square error expression.

[0099] S105. Use the first final model to perform prediction to obtain a first predicted value of the sample component.

[0100] For 500 sets of second small band spectral data, the single indicator modeling prediction method with the highest prediction accuracy is adopted, which specifically includes the following steps:

[0101] S201, dividing the small-band spectral data into a training set and a validation set;

[0102] Specifically, 400 sets of spectral data in the second small band are randomly selected as training sets, and the remaining 100 sets of spectral data are used as validation sets.

[0103] S202, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using the partial least squares method;

[0104] Specifically, the Gaussian smoothing window width is set to an odd number in the interval [1, 13], the detrending order is set to an integer in the interval [1, 5], and the number of principal components is set to an integer in the interval [1, 12];

[0105] S203, repeat step S202 to obtain multiple spectral models;

[0106] Specifically, there are a total of 7×5×12=420 spectral models, where 7 refers to an odd number from 1 to 13.

[0107] S204, predicting the validation set spectral data, calculating the prediction accuracy of each model for the validation set, and selecting the spectral model with the highest prediction accuracy as the second final model;

[0108] Specifically, the prediction accuracy of each model on the validation set is calculated by Obtained by calculation.

[0109] S205. Use the second final model to make predictions to obtain second predicted values ​​of sample components.

[0110] For 500 sets of third small band spectral data, the first processing method of using prediction accuracy and minimum root mean square error dual index modeling prediction is adopted, which specifically includes the following steps:

[0111] S301, dividing the small-band spectral data into a training set and a validation set;

[0112] Specifically, 400 spectral data are randomly selected from 500 sets of the third small band spectral data as the training set, and the remaining 100 spectral data are used as the validation set;

[0113] S302, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using partial least squares method;

[0114] Specifically, the Gaussian smoothing window width is set to an odd number in the interval [1, 15], the detrending order is set to an integer in the interval [1, 4], and the number of principal components is set to an integer in the interval [1, 15];

[0115] S303, repeat step S202 to obtain multiple spectral models;

[0116] Specifically, there are 8×4×15=480 spectral models in total, where 8 refers to an odd number from 1 to 15.

[0117] S304, predicting the validation set spectral data, calculating the prediction accuracy of each model for the validation set, and selecting a model with an accuracy higher than a first threshold, where the first threshold is 0.85 times the highest prediction accuracy value among the multiple spectral models;

[0118] Specifically, the prediction accuracy of each model on the validation set is calculated by Obtained by calculation.

[0119] S305, obtaining the RMSECV value corresponding to the model whose prediction accuracy is higher than the first threshold through leave-one-out cross validation, and selecting the spectral model with the smallest RMSECV value as the third final model;

[0120] Specifically, the RMSECV value is calculated using the root mean square error expression.

[0121] Through leave-one-out cross-validation, the RMSECV value corresponding to the combined model with a prediction accuracy higher than 0.85K was obtained, and the spectral model with the smallest RMSECV value was selected as the final model.

[0122] S306. Use the third final model to make predictions to obtain third predicted values ​​of sample components.

[0123] S04. Perform data fitting on the predicted values ​​of different components to obtain the final predicted values ​​of the components of the sample to be tested.

[0124] Specifically, the final predicted value of the component of the sample to be tested = (first predicted value + second predicted value + third predicted value) ÷ 3.

[0125] In addition, in this embodiment, for 500 sets of third small band spectral data, a second processing method of prediction using dual index modeling of prediction accuracy and minimum root mean square error can also be used, which specifically includes the following steps:

[0126] S401, dividing the small-band spectral data into a training set and a validation set;

[0127] Specifically, 400 spectral data are randomly selected from 500 sets of the third small band spectral data as the training set, and the remaining 100 spectral data are used as the validation set;

[0128] S402, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using the partial least squares method;

[0129] Specifically, the Gaussian smoothing window width is set to an odd number in the interval [1, 15], the detrending order is set to an integer in the interval [1, 4], and the number of principal components is set to an integer in the interval [1, 15];

[0130] S403, repeat step S402 to obtain multiple spectral models;

[0131] Specifically, there are 8×4×15=480 spectral models in total, where 8 refers to an odd number from 1 to 15.

[0132] S404, obtaining the RMSECV value corresponding to each spectral model through leave-one-out cross validation, and selecting a spectral model whose RMSECV value is less than a second threshold, where the second threshold is 1.2 times the minimum value of the RMSECV values ​​corresponding to the multiple spectral models;

[0133] Specifically, the RMSECV value is calculated using the root mean square error expression;

[0134] S405, predicting the validation set spectral data, calculating the prediction accuracy of each spectral model whose RMSECV value is less than the second threshold, and selecting the spectral model with the highest prediction accuracy as the fourth final model;

[0135] Specifically, the prediction accuracy is Calculate and obtain;

[0136] S406. Use the fourth final model to make predictions to obtain fourth predicted values ​​of the sample components.

[0137] Then, in step S04, the final predicted value of the component of the sample to be tested = (first predicted value + second predicted value + fourth predicted value) ÷ 3.

[0138] In particular, for 500 sets of third small band spectral data, two processing methods of prediction accuracy and minimum root mean square error dual index modeling prediction can also be adopted. Then, in step S04, the final predicted value of the sample component to be tested = (first predicted value + second predicted value + third predicted value + fourth predicted value) ÷ 4.

[0139] In the above embodiment, the correspondence between the three wavebands 1255nm-1550nm, 1555nm-1850nm and 1855nm-2150nm and the first small waveband, the second small waveband and the third small waveband can be arbitrarily combined.

Claims

1. A fitting prediction method for spectral data of a multi-sensor portable near-infrared spectrometer, wherein the multi-sensor portable near-infrared spectrometer comprises at least two sensors of different models, characterized in that: The following steps are involved: S01. Acquire a certain amount of spectral data; S02, dividing the spectral data according to the sensor model to obtain K small-band spectral data, where K is the same as the sensor model; S03, obtaining different component prediction values ​​for different small-band spectral data according to different data processing methods, wherein the different data processing methods include single-index modeling prediction with minimum root mean square error, single-index modeling prediction with maximum prediction accuracy, and dual-index modeling prediction with maximum prediction accuracy and minimum root mean square error; S04. Perform data fitting on the predicted values ​​of different components to obtain the final predicted values ​​of the components of the sample to be tested.

2. The fitting prediction method for spectral data of a multi-sensor portable near-infrared spectrometer according to claim 1, characterized in that: If the multi-sensor portable near-infrared spectrometer has a plurality of sensors of the same model, then, in step S01, it further includes performing averaging processing on the spectral data collected by the sensors of the same model in the same group of spectral data.

3. The fitting prediction method for spectral data of a multi-sensor portable near-infrared spectrometer according to claim 1, characterized in that: The minimum mean square error single index modeling prediction comprises the following steps: S101, dividing all small-band spectral data into training sets; S102, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using the partial least squares method; S103, repeating step S102 to obtain multiple spectral models; S104, obtaining the RMSECV value corresponding to each spectral model through leave-one-out cross-validation, and selecting the spectral model with the smallest RMSECV value as the first final model; S105. Use the first final model to perform prediction to obtain a first predicted value of the sample component.

4. The fitting prediction method for spectral data of a multi-sensor portable near-infrared spectrometer according to claim 1, characterized in that: The single-indicator modeling prediction with the highest prediction accuracy includes the following steps: S201, dividing the small-band spectral data into a training set and a validation set; S202, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using the partial least squares method; S203, repeating step S202 to obtain multiple spectral models; S204, predicting the validation set spectral data, calculating the prediction accuracy of each model for the validation set, and selecting the spectral model with the highest prediction accuracy as the second final model; S205. Use the second final model to make predictions to obtain second predicted values ​​of sample components.

5. The fitting prediction method for spectral data of a multi-sensor portable near-infrared spectrometer according to claim 1, characterized in that: The maximum prediction accuracy and minimum root mean square error dual index modeling prediction comprises the following steps: S301, dividing the small-band spectral data into a training set and a validation set; S302, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using partial least squares method; S303, repeat step S202 to obtain multiple spectral models; S304, predicting the validation set spectral data, calculating the prediction accuracy of each model for the validation set, and selecting a model with an accuracy higher than a first threshold; S305, obtaining the RMSECV value corresponding to the model whose prediction accuracy is higher than the first threshold through leave-one-out cross validation, and selecting the spectral model with the smallest RMSECV value as the third final model; S306. Use the third final model to make predictions to obtain third predicted values ​​of sample components.

6. The fitting prediction method for spectral data of a multi-sensor portable near-infrared spectrometer according to claim 5, characterized in that: The first threshold is 0.85 times the highest prediction accuracy value among the multiple spectral models.

7. The fitting prediction method for spectral data of a multi-sensor portable near-infrared spectrometer according to claim 1, characterized in that: The maximum prediction accuracy and minimum root mean square error dual index modeling prediction comprises the following steps: S401, dividing the small-band spectral data into a training set and a validation set; S402, setting the Gaussian smoothing window width and the detrending order, performing Gaussian smoothing and detrending processing on the training set, and then setting the number of principal components, and performing spectral modeling using the partial least squares method; S403, repeat step S402 to obtain multiple spectral models; S404, obtaining the RMSECV value corresponding to each spectral model through leave-one-out cross validation, and selecting the spectral model whose RMSECV value is less than the second threshold; S405, predicting the validation set spectral data, calculating the prediction accuracy of each spectral model whose RMSECV value is less than the second threshold, and selecting the spectral model with the highest prediction accuracy as the fourth final model; S406. Use the fourth final model to make predictions to obtain fourth predicted values ​​of the sample components.

8. The fitting prediction method for spectral data of a multi-sensor portable near-infrared spectrometer according to claim 7, characterized in that: The second threshold is 1.2 times the minimum value of the RMSECV values ​​corresponding to the multiple spectral models.

Citation Information

Patent Citations

  • Method for predicting water content of spread green leaves of green tea based on near infrared spectrum technology

    CN104931453A

  • Fitting prediction method based on different preference spectrum models

    CN114282446A