# An RSSI-Based Localization, Path Planning and Computer Vision-Based Decision Making Robotic System
## 3 Model Selection and Data Processing  
The quality and RSSI value distribution of database is shown in Figure 7.  
The values are not linearly distributed but change with the link quality. Position 2 shown in orange in the graph has a different distribution concerning the changing environment with time. It is hard to predict the exact location in a map without taking several samples over time and prediction or classification models. The best performing classification models were studied, and a comparative result for sampled data is shown in Figure 8.  
The input samples were randomized and applied to the classification model. The inputs were link quality and RSSI value, and positions were the output variables. The randomized data were segregated into 70:30 training:testing datasets. In Figure 8, the solid red dots are the training data, and light colored dots are the testing data. The red and blue regions are the boundary conditions  
Figure 6: Hardware setup: (**A**) Placement of embedded unit on the robot (**B**) Camera module positioned 1m above the ground level. Figure 7: Link quality vs. RSSI value distribution for individual positions. to separates points. The classifier accuracy depends on the dataset distribution (shown in the first column); if the datasets do not overlap, then the KNN, SVM, and NN have better accuracy compared to the RF. For RSSI-based indoor navigation system, RSSI values depend on the surrounding medium and the measured inputs overlapping. In this case, RF classification methods outperformed the KNN, SVM, and NN, as shown in the second row. The performance analysis of different classification models is shown in Tables 1 and 2. Mean absolute error (MAE), mean square error (MSE), and root mean square error (RMSE) were calculated for sampled and real-time scanned datasets. The RF classification method had lower \(MAE_{DB}\), \(MSE_{DB}\), \(MAE_{RT}\), \(MSE_{RT}\), and \(RMSE_{RT}\) compared to other methods. We took the samples in a grid formation, so the error between consecutive points of the identical distance was the same. The error value cannot justify the position angle with respect to the target point. We denote the location of the samples as a label for the classifier, and the errors calculated in Table 1 are the position number errors. The computational performance is measured based on the classification execution computation speed, and therefore, has a significant impact in a large sampled area. The RF classifier was computationally the fastest for sampled and real-time scanned datasets. Based on the classification \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Classification Method** & \(MAE_{DB}\) & \(MSE_{DB}\) & \(RMSE_{DB}\) & \(MAE_{RT}\) & \(MSE_{RT}\) & \(RMSE_{RT}\) \\ \hline K Nearest Neighbors & 2.549 & 16.130 & 4.016 & 6.696 & 58.344 & 7.638 \\ Random Forest & 2.135 & 13.121 & 3.622 & 4.914 & 33.986 & 5.830 \\ MLP Neural Network & 2.313 & 12.919 & 3.594 & 4.466 & 37.341 & 6.111 \\ RBF SVM & 2.430 & 14.824 & 3.850 & 5.546 & 39.048 & 6.249 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Error calculation of database and real-time scanned data. Figure 8: Comparative study of different classification models. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Classification Method** & **Classifier** & **Database** & **Real-Time** \\
**Method** & **Execution** & **Prediction** & **Data Prediction** \\ \hline K Nearest Neighbors & 298 ms & 11.1 s & 784 ms \\ Random Forest & 274 ms & 312 ms & 300 ms \\ MLP Neural Network & 3 m 6 s & 687 ms & 595 ms \\ RBF SVM & 36.6 s & 5 m 3 s & 23.0 s \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Computational performances of classification methods. accuracy calculated for samples, the random forest classification method is accurate and fast compared to other classifiers, and so can be used as a prediction model. The optimum estimators require for the random forest-based classification algorithm to be calculated to optimize the CPU processing.