# Detection for Frying Times of Various Edible Oils Based on Near-Infrared Spectroscopy
## 3 Results and Discussion
### Model Establishment and Evaluation
\begin{table}
\begin{tabular}{c c c c} \hline
**Frying Times** & **Soybean Oil** & **Peanut Oil** & **Rapeseed Oil** \\ \hline
1 & P\({}_{1}<-1.3230\) & P\({}_{2}<-1.2900\) & P\({}_{3}<-1.3018\) \\
2 & \(-1.3230\leq\) P\({}_{1}<-1.1346\) & \(-1.2900\leq\) P\({}_{2}<-1.2086\) & \(-1.3018\leq\) P\({}_{3}<-1.1057\) \\
3 & \(-1.1346\leq\) P\({}_{1}<-0.9696\) & \(-1.2086\leq\) P\({}_{2}<-1.0146\) & \(-1.1057\leq\) P\({}_{3}<-1.0078\) \\
4 & \(-0.9696\leq\) P\({}_{1}<-0.6939\) & \(-1.0146\leq\) P\({}_{2}<-0.7184\) & \(-1.0078\leq\) P\({}_{3}<-0.6979\) \\
5 & \(-0.6939\leq\) P\({}_{1}<-0.4682\) & \(-0.7184\leq\) P\({}_{2}<-0.5975\) & \(-0.6979\leq\) P\({}_{3}<-0.4457\) \\
6 & \(-0.4682\leq\) P\({}_{1}<-0.2958\) & \(-0.5975\leq\) P\({}_{2}<-0.2542\) & \(-0.4457\leq\) P\({}_{3}<-0.2308\) \\
7 & \(-0.2958\leq\) P\({}_{1}<0.8660\) & \(-0.2542\leq\) P\({}_{2}<0.0690\) & \(-0.2308\leq\) P\({}_{3}<-0.0136\) \\
8 & \(0.8660\leq\) P\({}_{1}<0.2044\) & \(0.0690\leq\) P\({}_{2}<0.2327\) & \(-0.0136\leq\) P\({}_{3}<0.1962\) \\
9 & \(0.2404\leq\) P\({}_{1}<0.3777\) & \(0.2327\leq\) P\({}_{2}<0.4855\) & \(0.1962\leq\) P\({}_{3}<0.4071\) \\
10 & \(0.3777\leq\) P\({}_{1}<0.6712\) & \(0.4855\leq\) P\({}_{2}<0.6998\) & \(0.4071\leq\) P\({}_{3}<0.7548\) \\
11 & \(0.6712\leq\) P\({}_{1}<0.9145\) & \(0.6998\leq\) P\({}_{2}<0.9379\) & \(0.7548\leq\) P\({}_{3}<0.8559\) \\
12 & \(0.9145\leq\) P\({}_{1}<1.1691\) & \(0.9379\leq\) P\({}_{2}<1.0899\) & \(0.8559\leq\) P\({}_{3}<1.1527\) \\
13 & \(1.1691\leq\) P\({}_{1}<1.4346\) & \(1.0899\leq\) P\({}_{2}<1.4668\) & \(0.1527\leq\) P\({}_{3}<1.4419\) \\
14 & \(1.4346\leq\) P\({}_{1}<1.6948\) & \(1.4668\leq\) P\({}_{2}<1.5722\) & \(1.4419\leq\) P\({}_{3}<1.6022\) \\
15 & \(1.6948\leq\) P\({}_{1}\) & \(1.5722\leq\) P\({}_{2}\) & \(1.6022\leq\) P\({}_{3}\) \\ \hline \end{tabular}
\end{table} 
Table 2: The relationship between the size of the threshold and frying times. Figure 6: The mean curves of the three types of oils are calculated by the Z-score. is carried out on the difference values of verification samples. The mean value and standard deviation of the original absorbance at 1168 nm and 1172 nm selected from the first eight rounds of experimental samples of each oil were taken as the fixed mean value and standard deviation of the model, as shown in Table 3. Among them, the mean and standard deviation obtained from soybean oil are approximately equal to the mean and standard deviation determined by [PERSON] (2018). To verify the accuracy of the model, the original spectral absorbance corresponding to the two characteristic wavelengths of the sample spectrum 1168 nm and 1172 nm are selected for differential processing, and the result is subjected to Z-score processing based on the mean and standard values in Table 3. Finally, the value calculated by Z-score is compared with the range of the model to determine the number of frying of each frying oil. Comparing the predicted values with the data in Table 2, frying times corresponding to each data of the two verification samples of each frying oil can be obtained and compared with the actual frying times to determine the accuracy of the model. The predicted curve of frying times is shown in Figure 7. If the allowable error is \(\pm\) 1, the prediction accuracy will be 100%. Based on the threshold and the differential prediction model, the frying times of soybean oil, peanut oil, and rapeseed oil are directly obtained within the allowable error range by detecting 1170 nm. This method simplifies the experimental operation and data processing and realizes the fast detection of frying times.