## 4 Machine Learning Approach  
Deep neural networks rely on large amounts of high-quality data to achieve satisfactory performance. Data quantity and quality are very important when training large and complex architectures. This is because deeper models typically have huge parameter sets that need to be trained and configured. This issue still applies to mobile network applications [16]. Using the MATLAB suite, we then configured a neural network that would take as input the RSSI data received from each of the 72 base stations, the values of the coordinates (latitude and longitude) of the message and the categorical value of the assigned subarea. This operation was recursively applied to all the subareas. To train a network using categorical features, we had to first transpose the categorical attributes to numeric using the _convertvars_ function by defining a string array which contains the names of all the categorical input variables. The dataset was split into training, validation and test datasets, with 15% of the data used for validation and 15% for testing. The neural network was defined with a feature input layer (BS1, BS2,..., BS72, lat, long and subarea), normalizing the data using the Z-score method. Then, a fully connected layer with an output size of 70 was added, followed by a batch normalization layer and a ReLU layer. Another fully connected layer with an output size equal to the number of classes was specified for classification, followed by a softmax layer and a classification layer, see Algorithm 1.  
In Figure 6, the architecture of the neural network used in this work is shown.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \multirow{2}{*}{**Number of Clusters**} & **Size of Smallest** & **Size of Largeest** & **Mean** & **Median** & **Number of Points** \\  & **Smallest** & **Largest** & **Cluster** & **Cluster** & **Not Part of Any** \\  & **Cluster** & **Cluster** & **Size** & **Size** & **Cluster** \\ \hline
13 & 14 & 880 & 212 & 78 & 10 \\ \hline \end{tabular}
\end{table}
Table 2: Output of the distance-based clustering function in the central area of Antwerp: \(Lat\in[4^{\circ}23^{\prime}00^{\prime\prime},4^{\circ}24^{\prime}00^{\prime \prime}]\) - \(Long\in[51^{\circ}12^{\prime}00^{\prime\prime},51^{\circ}13^{\prime}00^{\prime \prime}]\).  
Figure 6: Architecture of the Neural Network.  
```
layers = [  featureInputLayer(numFeatures,'Normalization', 'zscore') fullyConnectedLayer(70) batchNormalizationLayer reluLayer fullyConnectedLayer(numClasses) softmaxLayer classificationLayer]; miniBatchSize = 20; options = trainingOptions('adam',... 'InitialLearnRate',0.0007,... 'MiniBatchSize',miniBatchSize,... 'Shuffle','every-epoch',... 'ValidationData',tblValidation,... 'Plots','training-progress',... 'Verbose',false);
```  
**Algorithm 1** Neural Network Architecture and Training Options.  
In Table 3, a comparison of localization precision that can be achieved with various available techniques is shown.  
Using Table 3, we can see that the closest solution to the desired accuracy goal (with the same power) is the sensor-based approach. Therefore, the next step is to compare the neural network approach with the sensor-based one regarding the aspects of power consumption and computational complexity.