## 6 Experiment
### Design and Training of the Neural Networks in DLR+
Finally, the output layer in both neural networks (the one for the host fitness and the one for the messages) has a single neuron, that, according to Equation (2) and explained in Section 4.2, will have a value between 0 and 1. During the training process, this value is further converted to a digital value, so each sample has a unique label \(l\in\{0,1\}\), given by Equation (6), where \(f\) is the value returned by the sigmoid function in the last part of the forward pass. \[l\ =\ round\bigg{(}\frac{f\ +\ 0.5}{2}\bigg{)} \tag{6}\]  
This labeling process is used to compare and evaluate the prediction class during training. However, we have to remember that during runtime in the VDTN environment this labeling process must not be done, because we are only interested in identifying the samples with the best fitness (that is, the samples with the highest \(f\) value), which are directly obtained after the forward pass by the sigmoid function (see Equations (3) and (4)). For the training stage, DLR+ uses \(K+1\) synapses matrixes \(S_{i}\) with their corresponding bias vectors \(B_{i}\), with \(i\in\{0,\ldots,K\}\), where \(K\) is the number of hidden layers of the deep neural networks, as introduced before in Section 4.2. These matrixes are obtained during the training process by using a dataset with samples obtained from a simulation scenario with the conditions defined in Section 6.1. More particularly, the hosts were configured to be one of the three popular routers PRoPHET, Spray and Wait, or SeeR, and a total of 11,016,000 sample vectors \(X=[x_{1},x_{1},\ldots,x_{8}]\) were obtained from a simulation with a simulation time of 43,200 s (12 h), gathering the current features \(x_{i}\) of each of the 85 hosts each second. The labels \(l\) for each sample were directly obtained from the feature final delivery rate (FDR), considering that the more messages a host delivers to a final destination, the closer to a fit node it must be. For this, the samples were passed through a standardization process and the ones that got a positive \(z\)-score were considered as \"fit\" (\(l\ =\ 1\)) according to Equation (7), where \(x\) is the value of the aforementioned feature \(FDR\), \(\overline{x}\) is the mean of all those FDR values in the data set, and \(\sigma\) is the sample standard deviation. \[l\ =\ \left\{ \begin{array}{ll}0,&z<0\\ 1,&z\geq 0\end{array} \right.,\ \text{with}\ z=\frac{x-\overline{x}}{\sigma} \tag{7}\]  
In preprocessing, all duplicated records were deleted from the original dataset, and all remaining values were normalized for each feature \(x_{i}/y_{i}\), according to Equation (5), to have a better mapping and a faster convergence during training; finally, the final dataset was randomly permuted. From this, the resulting dataset was split into two subsets for real training (80% of the data) and validation (20%), to assess the learning process and generalization. Other hyperparameters of the neural networks were the ADAM optimizer (faster than the traditional stochastic gradient descent, [36]) and binary cross-entropy as an error function. This way, we got 90.12% accuracy in the training set and 90.55% in the validation set. This is how synapses and bias matrixes \(S_{i}\) and \(B_{i}\) used in DLR+ were obtained.