## 5 Implementation and Evaluation
### Complexity Analysis for the Water Cycle Detection Approach
#### 5.1.2 Evaluation of the Water Cycle Approach  
WC was used with the WSN-DS dataset to detect the most important features. Moreover, five classifier algorithms were evaluated in this work along with the WC technique. The standard cross-validation was used, which requires the training and validation sets to crossover in successive rounds. All this means that every data point can have a chance to be validated. A sub-category of cross-validation was \(k\)-fold data cross-validation. After using this cross-validation, the data were split into \(k\) segments of training and testing, \begin{table}
\begin{tabular}{c c c} \hline \hline
**Scenarios** & _Mpop_ & _Msr_ \\ \hline
1 & 2 & 3 \\
2 & 2 & 5 \\
3 & 2 & 9 \\
4 & 4 & 3 \\
5 & 4 & 5 \\
6 & 4 & 9 \\
7 & 8 & 3 \\
8 & 8 & 5 \\
9 & 8 & 9 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Some scenarios of parameters for the water cycle as feature selection. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Technique** & **Parameter** & **Value** \\ \hline GA & & \\  & Mutation rate & 0.5 \\ PSO & Number of selection & 3 \\  & Constant-1 & 2 \\  & Constant-2 & 2 \\ HS & & HRCR & 0.7 \\  & PAR max & 0.8 \\  & PAR min & 0.2 \\ SA & & Initial Temp & 0.2 \\  & Temp reduction rate & 0.87 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Feature selection parameters settings. which were either equal or assumed to be approximately equal in size or folds. As such, \(k\) iterations were performed to practice and train results alongside validation in such a way that a different data fold was maintained within each iteration for validation, while the (\(k-1\)) iterations were utilized for basic learning. In the context of data extraction, text mining, and machine learning, (k = 10) 10-fold cross-validated appears to be the most widely used and widespread value for the data [62]. As such, we first used 90% training and 10% testing, then 80% training and 20% testing and so on until reaching 10% training and 90% testing, after which we took the average. At this point, it must be emphasized that the results shown in the rest of this section are based on average scores for more than 20 algorithms (combining feature selection methods and classifier algorithms). In order to facilitate the computation of the average in the results of the implementation of the algorithm, we repeated the execution of the algorithms about 100 times for each execution. To begin with, we reviewed the accuracy performance of the classifier algorithms, namely DT, SVM, KNN, DL, and NB, on the WSN-DS dataset, along with the total number of dataset features. Table 6 shows the accuracy results for these classifier algorithms. According to the values retrieved from the Table, the DT classifier displayed the highest accuracy result with a rate of 99.6%. The SVM was 98.8%, KNN was 98.5%, DL was 97.7%, and NB was 56.9%. We note that the NB showed the worst performance in terms of accuracy. One of the reasons for DT's good results is that the type of data collected from network traffic in most of its features are numerical statistical values [68]. Therefore, statistical and logical machine learning techniques provide good results with less training time. In order to illustrate the effect of feature selection techniques on the accuracy of detection using the WSN-DS dataset, we integrated machine learning classifier algorithms along with feature selection techniques as mentioned previously to detect the most important features of the WSN-DS dataset. The WC technique was benchmarked with various feature selection techniques such as PSO [21], SA [22], HS [19], and GA [23] using the same classifier algorithms and dataset. The output of these operations is shown in Table 7. The Table also shows the accuracy performance of each integrated technique, number of WSN-DS features they used, and sequence of the features. Based on the results of Table 7, we found that the best accuracy performance was achieved with the WC feature selection technique.