## 5 Results and Discussion
### The Comparative Performance of PRDFS and BRDFS in Detecting Malicious Nodes  
#### 5.2.1 Major Findings:  
* PRDFS maintains a high malicious node detection accuracy of around 95% (ranging from 97% to 89%) while still maintaining a low FPR, ranging from 3-9%, with the increasing percentage of malicious nodes (Figures 8 and 9). In contrast, the accuracy of BRDFS sharply falls with the rising FPR as the percentage of malicious nodes increases (Figures 8 and 9). * PRDFS successfully detects all malicious nodes within the first 30-time steps regardless of the percentage of the malicious nodes, whereas BRDFS fails to detect any malicious node after 15-time steps (Figure 10). It appears that BRDFS has a shorter time window for detecting malicious nodes than PRDFS. Figure 7: A comparison of resilience between PRDFS and BRDFS under different percentages of malicious nodes. Figure 7 shows the mean resilience of PRDFS and BRDFS in demand forecast accuracy under different percentages of malicious nodes. The X-axis represents the percentages of malicious nodes, and the Y-axis represents the mean resilience. The mean resilience of a system under a given percentage of malicious nodes is the ratio of mean (point or interval) demand forecasting accuracy under attacks with the given percentage of malicious nodes to the mean (point or interval) demand forecasting accuracy under no attack. The red and blue lines plot the mean resilience of PRDFS in respect to point demand forecast accuracy and interval demand forecast accuracy, respectively, over 1000-time steps under different percentages of malicious nodes. The pink and green lines plot the mean resilience of PRDFS in terms of point demand forecast accuracy and interval demand forecast accuracy, respectively, over the first 40-time steps under different percentages of malicious nodes. The orange and black line plots the mean resilience of BRDFS in terms of point demand forecast accuracy and interval demand forecast accuracy, respectively, over 1000-time steps under different percentages of malicious nodes. The figure shows that PRDFS demonstrates near perfect mean resilience over 1000-time steps in both point and interval forecasting accuracy for all percentages of malicious nodes. However, the mean resilience of PRDFS over the first 40-time steps shows the signs of weakening with the increase in malicious nodes. In BRDFS, the mean resilience over 1000-time steps falls sharply as the percentage of malicious nodes increases. PRDFS is observed to have higher resilience in the interval demand forecasting accuracy than in the point forecasting accuracy. The opposite trend is seen in BRDFS. * BRDFS manages to correctly detect malicious nodes when the percentage of malicious nodes is low (Figures 10 and 11). BRDFS fails to detect any malicious node when the percentage of malicious nodes is 30% or over (Figure 11). Figure 8: A comparison of accuracy between PRDFS and BRDFS for classifying normal and malicious nodes. Figure 8 depicts the node classification accuracy of PDRFS and BRDFS under the varying percentage of malicious sensor nodes. The X-axis represents the percentages of sensor nodes that are malicious in the simulation trial. The Y-axis represents the mean accuracy of classifying the sensor nodes into one of the two classes (malicious and normal) over the 1000-time steps. The classification is done at each time step. The blue line shows the classification accuracy of PRDFS under different percentages of malicious nodes, whereas the orange line shows the mean classification accuracy of BRDFS under different percentages of malicious nodes. PRDFS achieves high malicious node detection accuracy. The accuracy of PRDFS is almost always over 90%. The orange line shows a dramatic fall in the accuracy of BRDFS as the number of malicious nodes increases. Its accuracy varies from over 90% to 0%. Figure 9: A comparison of False Positive Rates (FPR) for PRDFS and BRDFS for detecting malicious nodes.