# Comparative Study of Different Approaches for Islanding Detection of Distributed Generation Systems
## 4 Result and Discussion
### Result of Islanding Detection by the Data Mining-Decision Tree Algorithm  
Similarly, on the other hand, the decision tree is generated using the CART algorithm in the scikit-learn module of the Python programming language [81]. From the total data set, 70% of the data are used as training data and the remaining 30% are used as testing data. The testing data set are generated randomly for each case of islanding state and non-islanding state. The topmost part of the tree is also known as the decision node, which consists of the condition, can be either true or false, following the path of true or false, and it finally ends at a leaf node, while, for a leaf node, the 'value' consists of two pieces of numeric data. The value on the left-hand side represents the value of the non-islanding condition and on the right-hand side represents the value of the islanding condition.  
The total training samples are 88, out of which 44 samples are for the islanding condition and another 44 are for the non-islanding condition. The node is split until the minimum gini for the samples are obtained and all the samples are correctly classified. For instance, the data sample where the value of active power is calculated as 1, reactive power as 0.64, rate of change of power (Dp) as -7.89, voltage as 0.9857 pu and power angle as 25.25 degrees is taken to explain the workings of the developed algorithm. In accordance with the developed tree, first the algorithm checks the power angle, which is greater than 21.75; then, it proceeds to check power (P) which in this case is less than 34.54. The condition is true and it proceeds towards the left side to check if the power angle is greater than 22.316. This is false, which directs the algorithm to check Dp/P, which in this case is less than 140.111. Furthermore, it checks if the power angle is less than or equal to 22.99. In the same manner, the process continues and finally ends at the leaf node at the bottom left corner, thus determining the condition to be the 'islanding condition'. This path is denoted by the darker shaded decision boxes in Figure 6. The gini index in the box is used to determine the uncertainty in the result. Here, the gini index is zero, meaning that the result obtained is 100% certain. The actual tree diagram of the conducted analysis is shown in Figure 5.  
Figure 6: Decision tree for generated data.  
The entire data set was classified into islanding mode and non-islanding mode. The model successfully classifies all the training set data to the correct classification as shown in Table 4. Thus, the accuracy of the model with the training set data is 100%. Likewise, for the testing set data, the model classified 35 out of 37 events to the correct classification. Thus, the accuracy of the model for testing set is 94.5%. In one of the cases, the occurrence of islanding in 2.5 s led to the detection of islanding within 0.162309 s. Simulation of both the methods were conducted using the computer having Intel(r) Core(tm) i7-7500U @ 2.70 GHz (4 CPU), -2.9 GHz processor specifications and 8192 MB of RAM.