# Explanation of Air Quality Data Using Takagi-Sugeno Fuzzy Inference System
## 5 Data Analysis
\begin{tabular}{c c c c c c c c c c c} \hline \hline \# & **IN1** & **IN2** & **IN3** & **IN4** & **IN5** & **IN6** & **IN7** & **IN8** & **IN9** & **IN10** & **OUT** \\ \hline R1 & 224.229 & 231.127 & 1.152 & 2.795 & 0.077 & 10.157 & 1412.038 & 43.316 & 4.172 & 7.716 & 19.411 \\ R2 & 220.996 & 207.963 & 1.555 & 3.901 & 0.015 & 9.972 & 98.000 & 31.562 & 2.828 & 22.001 & 19.893 \\ R3 & 187.044 & 180.090 & 2.858 & 5.705 & 0.100 & 9.776 & 801.994 & 41.860 & 4.879 & 8.254 & 8.959 \\ R4 & 167.882 & 162.783 & \(-\)2.970 & 2.405 & \(-\)1.000 & 3.632 & 491.931 & 37.351 & 7.519 & 17.812 & 47.971 \\ R5 & 222.906 & 207.862 & \(-\)0.307 & 3.184 & \(-\)0.050 & 13.320 & 822.013 & 43.239 & 5.152 & 5.242 & 28.331 \\ R6 & 73.016 & 90.221 & 0.509 & 2.028 & 0.294 & 22.259 & 100.003 & 33.187 & 6.084 & 19.873 & 29.211 \\ R7 & 211.959 & 236.062 & 0.330 & 2.543 & 0.052 & 5.598 & 70.008 & 27.661 & 3.761 & 2.918 & 16.469 \\ R8 & 142.039 & 135.051 & 0.296 & 3.479 & \(-\)0.219 & \(-\)0.292 & 1491.981 & 44.787 & 4.806 & 10.125 & 36.897 \\ R9 & 246.249 & 225.135 & 0.540 & 5.885 & 0.459 & 17.695 & 292.003 & 36.410 & 6.945 & 16.965 & 13.941 \\ R10 & 130.887 & 123.929 & \(-\)0.818 & 2.123 & 0.053 & 2.209 & 80.035 & 33.252 & 4.362 & 3.031 & 40.331 \\ R11 & 323.971 & 292.967 & 1.988 & 4.425 & \(-\)0.052 & 15.781 & 1267.966 & 43.460 & 1.150 & 8.888 & 11.050 \\ R12 & 48.938 & 61.896 & 3.057 & 2.875 & \(-\)0.130 & 21.712 & 1056.000 & 41.600 & 4.484 & 8.029 & 20.969 \\ \hline \hline \end{tabular}   
From the first row of Table 3, it follows that the first rule has the following form:  
Figure 5: Abbreviated list of input and output variable parameters. IF Wind direction is approximately 224.229 AND Direction of max. wind gust is approximately 231.127 AND Average wind speed is approximately 1.152 AND Speed of max. wind gust is approximately 2.795 AND Total rainfall is approximately 0.077 AND Air temperature is approximately 10.157 AND Intensity of vehicles is approximately 1412.038 AND Average speed of vehicles is approximately 43.316 AND the Day of the week is approximately 4.172 AND Hour of the day is approximately 7.716 THEN Value of \(PM_{10}\) is approximately 19.411._  
Moreover, from Table 3, it follows that the greatest output value of the created rule base is approximately 48 \(\upmu\)g/m\({}^{3}\) (see _Rule 4_ in Table 3). Let us remind the reader that the data analysed by us had the specificity that the resulting values were from the interval \([0,108]\), but out of 3826 data measurements, only 26 reached a value greater than 60 \(\upmu\)g/m\({}^{3}\). We were interested in the quality of the approximated data whose output value was greater than 60 \(\upmu\)g/m\({}^{3}\). Therefore, we sorted the data according to the output value and plotted them in a graph together with the approximated data (see Figure 6). We found that the biggest error occurs precisely for data whose input value is greater than 60 \(\upmu\)g/m\({}^{3}\). We looked at the input data again, this time only at those whose output value was greater than 60 \(\upmu\)g/m\({}^{3}\)  
The values of the variables of the created rule base with 14 rules are displayed in Table 5. Note that there are two cells that do not contain any value. This means that the output value does not depend on that specific input variable. During the creation of the 13 th and 14 th rules, we used only the values from the interval \([60,108]\), which represent the real values of \(PM_{10}\) obtained in Prague. It is also interesting that after training, we obtained a value of one output variable equal to 2397.486.