# Optimizing Rule Weights to Improve FRBS Clustering in Wireless Sensor Networks
## 4 Rule Weights Interpretation
### Metric Comparison  
This section presents some examples of rules that received weight values that can be clearly contrasted because they were 0 or 1. Therefore, these values assume that a rule was not evaluated at all (weight 0) or that it was completely meaningful for this stage (weight 1). Note that the weight values for all other rules were between 0 and 1 and can be found at the published dataset (See data availability statement).  
In Table 9, three rules can be found that show a significant difference between the weights for FND and HND when the BS was located in the center of the deployment area (Scenario 3). The table shows the weights obtained for \(KB_{initial}\) or \(W_{initial}\) and the weights for \(KB_{intermediate}\) or \(W_{intermediate}\).  
In this case, the rules in Table 9 were not taken into account in the KB to obtain the best FND, because their weights were 0. However, they should not be removed from the KB because they are needed to maximize the HND in the second stage. In a similar way, in Table 10, the weights for the other three rules can be found (take \(W_{final}\) as the weight obtained from the optimization of \(KB_{final}\)), which had differences in the optimization process. In this case, the three rules were meaningful to maximize LND, whereas they were not taken into account to obtain the best FND.  
The third example of differences in the weights optimized by the PSO-RWT algorithm are shown in Table 11. In this case, the four rules in the table were used to maximize the HND, while they were not considered for the LND.  
One conclusion of this first analysis of the results is that fuzzy systems are difficult to design, even more when they have to use a high number of variables with complex layouts. In this case, rule optimization can help to tune the knowledge base and optimize the results. Consequently, as can be seen in Table 12, the knowledge base may sometimes contain rules that are useless for some situations, such as the rules when the base station was located in a corner of the coverage area (scenario 1). However, these rules cannot be removed from the KB, as previously mentioned, because they may be useful for other situations.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**dBS** & **C** & **ND** & **RE** & **CHR** & **Output** & \(W_{initial}\) & \(W_{final}\) \\ \hline C & M & H & M & L & hm & 0 & 1 \\ F & H & L & M & H & m & 0 & 1 \\ F & M & M & M & H & m & 0 & 1 \\ \hline \hline \end{tabular}
\end{table}
Table 10: FND versus LND. BS in center.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**dBS** & **C** & **ND** & **RE** & **CHR** & **Output** & \(W_{initial}\) & \(W_{final}\) \\ \hline F & H & M & M & H & hm & 1 & 0 \\ A & L & H & H & H & ls & 1 & 0 \\ C & M & M & L & M & m & 1 & 0 \\ C & L & M & L & L & llm & 1 & 0 \\ \hline \hline \end{tabular}
\end{table}
Table 11: HND versus LND. BS in center.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**dBS** & **C** & **ND** & **RE** & **CHR** & **Output** & \(W_{initial}\) & \(W_{final}\) \\ \hline C & H & L & H & L & hm & 0 & 1 \\ A & L & H & M & M & m & 0 & 1 \\ C & H & L & H & M & ls & 0 & 1 \\ \hline \hline \end{tabular}
\end{table}
Table 9: FND versus HND. BS in center.