# NetSel-RF: A Model for Network Selection Based on Multi-Criteria and Supervised Learning
## 3 NetSel-RF Model
### Modeling  
We evaluated five classification algorithms, namely the three used in the features selection plus ARF and HAT. ARF is an adaptation of RF, which includes mechanisms to adapt to different kinds of concept drifts, given the same hyper-parameters. HAT adaptively learns from data streams that change over time without needing a fixed size of sliding window. The optimal size of the sliding window is a complicated parameter to guess for users since it depends on the rate of change of the distribution of the dataset [21]. We used these five algorithms because the target variable is categorical. As evaluation metrics, we used the two used in the feature selection plus TPR, FPR, precision and time of classification (\(T_{\text{C}}\)). TPR is the number of class members classified correctly over the total number of class members (i.e., the label AP1 is used when AP1 is the correct selection for handover). In contrast to TPR, FPR is the number of class members classified incorrectly over the total number of class members (i.e., label the AP1 is used when AP3 is the correct selection for handover) [28]. The precision is the number of class members classified correctly over the total number of instances classified as class members [29]. \(T_{\text{C}}\) is the time spent by an algorithm to classify the selected AP [28]. Furthermore, we used cross-validation, which consisted of randomly dividing the final dataset into two parts: 80% for training and 20% for validation. As a result of the modeling phase, we obtained the classification model, called NetSel-RF. \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c c c c} \hline \hline  & **station** & **ap1** & **rssi1** & **occ1** & **con1** & **ap2** & **rssi2** & **op2** & **ap3** & **rssi3** & **ocu3** & **con3** & **ap4** & **rssi4** & **occ4** & **con4** & **AP\({}_{\text{Target}}\)** \\ \hline
**1** & stsl & 0 & \(-100\) & 100 & 1.00 & 1 & \(-6.67\) & 0.031 & 1 & \(-72.0\) & 46.67 & 0.031 & 0 & \(-100\) & 100 & 1.00 & ap3 \\
**2** & stsl2 & 0 & \(-100\) & 100 & 1.00 & 1 & \(-58.0\) & 55.56 & 0.010 & 1 & \(-76.0\) & 0.00 & 0.041 & 0 & \(-100\) & 100 & 1.00 & ap2 \\
**3** & stsl3 & 0 & \(-100\) & 100 & 1.00 & 0 & \(-100\) & 100 & 1.00 & 1 & \(-69.0\) & 53.33 & 0.024 & 1 & \(-76.0\) & 45.00 & 0.052 & ap3 \\
**4** & stsl4 & 0 & \(-100\) & 100 & 1.00 & 1 & \(-74.0\) & 66.67 & 0.046 & 1 & \(-66.0\) & 60.00 & 0.018 & 1 & \(-77.0\) & 40.00 & 0.056 & ap3 \\ \hline \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) & \(:\) \\
**10500** & stsl4 & 0 & \(-100.0\) & 100 & 0.10 & 1 & \(-72.0\) & 66.67 & 0.030 & 1 & \(-64.0\) & 46.67 & 0.0169 & 0 & \(-100.0\) & 100.0 & ap3 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Excerpt of final dataset. Figure 3: Feature selection; (**a**) Accuracy evaluation, (**b**) MCC evaluation. Figure 4 shows the evaluation results regarding accuracy. These results reveal that RF and ARF obtain higher accuracy than the other evaluated algorithms. In particular, RF and ARF reach an accuracy of approximately 99.7% and 99.57%, respectively. These results are due to RF and ARF being able to handle large amounts of data with higher dimensionality; additionally, RF and ARF require less cleaning and pre-processing of data compared to other learning methods. Figure 4 depicts the evaluation results regarding MCC. These results reveal that RF and ARF also obtain a higher MCC than SVM, HT, and HAT. In particular, RF and ARF reach an MCC of approximately 0.996 and 0.994, respectively. These results are because tree-based algorithms are efficient at finding complex correlations. Therefore, RF and ARF provide a high correlation between real and predicted values for HM. We also evaluated HT, HAT, RF, ARF, and SVM by using the confusion matrix, which is a fundamental tool to evaluate the performance of classification algorithms; this matrix allows us to determine quickly if the model is confusing different classes.