# Adaptive User Profiling in E-Commerce and Administration of Public Services
## 4 Results and Discussion
### Use Neural Networks in Predictions of Our Users
#### 4.4.5 Key Points of the Code and Screenshots of the Outcomes  
The logistic sigmoid function defined as (\(1/(1+\mathrm{e}^{-\mathrm{x}})\)) takes an input x of any real number and returns an output value in the range of \(-1\) and \(1\). Sigmoid activation function: f(x) = \(1/(1+\mathrm{e}^{-\mathrm{x}})\) return \(1/(1+\mathrm{np.exp}(-\mathrm{x}))\) The derivative of the sigmoid function is:x  
Derivative of sigmoid: f(x) = f(x) \(\times\) (\(1-\mathrm{f(x)}\)) fx = sigmoid(x) return fx \(\times\) (\(1-\mathrm{fx}\)) After the feeding forward of our neural network and the training, we updated the weights and the biases, and after calculating the total loss of each cycle inside our neuron, some predictions can be made, such as the following:In Figure 6, it is shown how two users were tested for their gender, and in Figure 7, it is shown if any assumptions can be made regarding their parenthood. To be more precise, for each new user that enters our system, we could, after having recorded some of his/her movements, determine whether this user is a man or a woman or a parent, respectively. Our system could dynamically show relevant pages that pertain to that user only and not generic pages that we would show to an unknown user. We have defined in our code and trained our neural network when it calculates values less than 0.4 to assume that this user is male, and if it calculates values greater than 0.6 to assume that this user is female, and for values in between, not to make any prediction. Similarly, it works for the case of whether a user is a parent or not. It is implied that the closer to 0 or 1 the prediction is, the stronger it gets. That is, in the above example shown in Figure 6, the prediction for user \"[PERSON]\" resulted in 0.945, which is very close to 1, so this user is almost certainly a female. Similarly, for user \"[PERSON]\", the result from the neural network calculations showed 0.034, which is very close to 0, so this is also a strong and rather confident prediction. In case the outcome is about in the middle, as we can see in Figure 7, which shows that the parenthood of user \"[PERSON]\" is 0.485, the system cannot make any predictions with the data recorded so far for him/her, based on his/her movements and choices. Since all this is done dynamically, in the future we could also predict whether this user is a parent or not when we have more data recorded for him/her. Summarizing this chapter of this article, we could say that we presented the way of implementation and structure of our electronic application. We also showed how we tested it for the quality of its results by using condensed questionnaires. Our analysis of these  
Figure 6: Prediction for a user. This user is a female and a Parent. Figure 7: Prediction for a user. This user is a Male and a no prediction can be made for his parenthood, so probably he is not a parent. showed that it does indeed work successfully and produces significant and accurate results for user profiling. Finally, we showed how neural networks could improve and automate the system's user analysis processes. The users in our questionnaires showed that about 85% of them know that their movements and purchases in online stores are recorded, which means that now we all feel comfortable with it. In our question about whether they have concerns when they are shopping online, 56% said no and 44% said yes. If the risk of users' privacy violation is reduced, then it is certain that more customers will be less concerned, and this is something we should all strive for in our future surveys [39]. Other scientists have shown in their research that user profiles can be used in e-commerce recommendation systems [9; 40], for intelligent travel recommendation systems for individual and group users [41] and for inferring satisfaction in public information access services [42]. They could also be used in other platforms such as Recommendation System for E-Learning [43] and for the security of social networks [44], which have come to so dominate our lives [45; 46].