# Clustering-Based Segmented Regression for Particulate Matter Sensor Calibration
## 3 Results
### Evaluation
#### 3.2.7 Stability of the Model  
The training set of model calibration segment is randomly selected from the data set according to a certain proportion. In order to measure the stability of our method, we test whether the calibration effect will fluctuate greatly due to the change of training set selection. We record the RMSE between calibration value and standard station data due to different training set selections when using global linear regression to calibrate PM\({}_{2.5}\) data and PM\({}_{10}\) data of sensors on the same set of data for many times, and the RMSE caused by different training set selections when using our method to calibrate PM\({}_{2.5}\) data and PM\({}_{10}\) data of sensors. The RMSE data in the two groups of tests are formed into a boxplot. As shown in Figure 15, when applied to PM\({}_{2.5}\) and PM\({}_{10}\) pollutants, our method has lower error than the global linear regression in addition to lower variance, and improvements in stability of calibration performance are achieved.  
\begin{table}
\begin{tabular}{c c c c} \hline
**Target Pollutant** & **Group 1** & **Group 2** & **Group 3** \\ \hline PM\({}_{2.5}\) & 16.89\% & 17.27\% & 20.37\% \\ PM\({}_{10}\) & 13.42\% & 9.68\% & 14.15\% \\ \hline \end{tabular}
\end{table}
Table 2: Ratio of improvement: Compared with a global linear regression, the performance of proposed method applied on both PM\({}_{2.5}\) and PM\({}_{10}\) calibration is improved.  
Figure 14: Taking RMSE as the evaluation index, the initial error of PM\({}_{10}\) concentration between the sensor and the standard station, the error after global linear regression and the error processed by our method are calculated.  
We take the target pollutant concentration of the sensor as the X-axis, and the target pollutant concentration provided by the standard station as the Y-axis. The data before the calibration of the sensor PM\({}_{2.5}\) are displayed with red scatter points, the sensor PM\({}_{2.5}\) data calibrated with our method are displayed with blue scatter points, and the data of PM\({}_{10}\) are also plotted with the same method. In an ideal case, the data measured by the sensor should be equal to the reference value provided by the standard station. The scatter diagram in this coordinate system is in the shape of X = Y. However as shown in Figure 16, due to the influence of sensor performance and environment, the data before PM\({}_{2.5}\) and PM\({}_{10}\) calibration contains a large error, that is far from X = Y. After our method calibration, the data error is reduced, and the distribution is pulled back to the X = Y axis, which is extremely effective in the application of PM\({}_{2.5}\) and PM\({}_{10}\) pollutants.  
In order to measure the fitting degree between the sensor concentration data processed by the model and the data of the standard station, the determination coefficient is used as an indicator. Compared with the baseline before calibration, our method is used for calibration. As shown in Table 3, in these three cases, the \(R^{2}\) of the sensor PM\({}_{2.5}\) and PM\({}_{10}\) concentration and the standard station PM\({}_{2.5}\) and PM\({}_{10}\) concentration can be seen that the sensor target pollutant concentration calibrated by our method has a higher fitting degree to the standard station and is closer to the true value.  
Figure 16: The X-axis represents the pollutant concentration measured by the sensor, and the Y-axis is the pollutant concentration provided by the standard station. The scatter plot is constructed, which shows that the PM\({}_{2.5}\) (**a**) and PM\({}_{10}\) (**b**) data of the sensor are pulled back to the standard value after calibration.  
Figure 15: PM\({}_{2.5}\) (**a**) and PM\({}_{10}\) (**b**) are taken as the target calibration values, the global linear regression and our method are tested repeatedly numerous times, respectively. The error of each calibration value is recorded and formed into a boxplot. This boxplot reflects the stability and error range of the model.