## 5 Results  
### Neural Networks Results  
The considered network structure consists of three layers: one input layer, one hidden layer, and one output containing 64 nodes for each layer (Figure 13). The rectified linear unit (ReLU) is used as a non-linear activation function in the deep learning domain. The main advantage of using the ReLU function over other activation functions is that it activates all the neurons over time. This means that the neurons are deactivated if the output of the linear transformation is less than 0, instead of returning the input value itself for positive input values. The mean squared logarithmic error (MSLE), known as loss function, can be interpreted as a measure of the ratio between the actual and predicted values. The MSLE loss function, commonly used to predict values that can cover a wide range of magnitudes, has provided 0.0077 for the training procedure and 0.1059 for the test procedure as results.  
The optimization of the MSLE loss function was obtained by the adaptive moment estimation (ADAM) optimizer. It is a variant of stochastic gradient descent (SGD) that uses adaptive learning rates to update the model parameters. The ADAM optimizer combines two optimization algorithms, AdaGrad and RMSProp. The ADAM provides a learning rate for each parameter based on historical gradient information. However, unlike AdaGrad and RMSProp, ADAM incorporates an exponentially decaying average of past gradients and a moving average of the second moments of gradients. These additional steps help to smooth out the learning rate and to enhance the convergence of the algorithm.  
Figure 13: Neural Network Structure.  
The predicted values of the target (resistance) relative to the training data set and the test data set are shown, respectively, in Figure 13(a),b. The presented results show a good performance in terms of prediction; however, the maximum error is around 7%. As the magnitude of the resistance value increases, the predicted values of resistance deviate from the true values. Furthermore, in Figure 14(a),b, the relative error of the predicted value of the sensor's resistance compared to the true value on the training and test data sets is represented, respectively. Then, the same neural network architecture was used to validate the data forces achieved by the Arduino platform and LabVIEW for easy detection. In particular, Figure 15(a) shows the matrix of response at the pressure force (F = 1.05 N) applied on the active cell (I11). Figure 15(b) exhibits the comparison between the true and predicted force targets obtained by ANN, expressed by a good performance in prediction. Therefore, the relative approximation error of the prediction distribution of the force applied on the mat is shown in Figure 15(c). The result reveals that the approximation error equals 0 due to the Arduino embedded system. The structure of the neural network has been developed and defined using the coding language Python with libraries of Keras in TensorFlow.  
Figure 14: Comparison between True and Predicted Target: (**a**) training data set (**b**) test data set.  
Figure 15: Relative approximation error of prediction distribution: (**a**) training data set (**b**) test data set.