# Energy Prediction of Access Points in Wi-Fi Networks According to Users' Behaviour
## 6 Energy Prediction  
In this section, we present the results of the energy and roamings prediction of the network after removing \(AP_{8}\), following the three phases described in Section 3. First, we analyse the full network infrastructure during the valid period (56 days, time slot 9:00-21:00) from the collected data and the relationship between roamings and energy. After obtaining the total energy measured in each AP as the array \(TCE\), the number of roamings by user in each AP as the matrix \(CR\), and the total roamings by AP as the array \(TCR\), we calculate the coefficients array \(C\) according to (1). These coefficients represent the effect of the users' behaviour (expressed as the number of roamings) on the energy used in the APs. This effect is unique for each AP, because of their particular characteristics (placement, level of interferences, wire lengths, etc. ), hence the point relationship. Figure 5 shows graphically the proportional point relationship between energy (bars \(TCE\)) and roamings (bars \(TCR\)) in the APs during the period for the full network infrastructure. This relationship is given by the coefficients \(C\). Secondly, we bring up a simulated network removing \(AP_{8}\). First, we build \(R\) from \(CR\) setting to zero the roamings corresponding to \(AP_{8}\). At the same time, we select the unknown values in \(CR\) according to a strategy where we select just one cell by row as an unknown value, following successive column positions; this guarantees enough representation in the matrix to force the learning algorithm to consider varied characteristics of users and access points, as it was validated in [20]. Next, we elaborate the prediction model defined by \(W1\) and \(W2\), both calculated using MF and GD, according to their main parameters: training and test datasets, latent factors, the learning rate and the regularisation term. Figure 4: Minimum, maximum, average and total energy in each AP, considering the valid period (56 days with users’ activity) and the usual time slot (9:00 to 21:00). The values for these parameters were chosen carefully, according to the characteristics of the prediction context (nature of the problem, size of the training dataset, etc. ), since certain values can be good in some contexts and worse in others. \(K\) has to do with the factors related to the network context and users' behavior; it is not known and is difficult to identify, although it might be not very high. The convergence of GD is affected by the value of \(\beta\); although the most usual case is to select a fixed value, it also can be adjusted automatically (if the algorithm does not converge or for accelerating the convergence) or adaptively selected [23, 24]. Last, \(\lambda\) could affect the accuracy of the prediction error, although it can be chosen from a wide range of values with no worries. For these reasons, we ran many prediction experiments in a similar context (prediction of roamings in a larger Wi-Fi network), considering different values of \(K\), \(\beta\) and \(\lambda\)[20]. Specifically, the experiments for choosing the best \(K\) considered a large network composed of 37 APs and 1517 users collecting roamings during 30 days, and they selected \(K\) values from 2 to 100. After calculating the corresponding predictions, we observed that higher \(K\) values caused worse predictions. As the factorization models are implicitly able to encode latent factors of users and APs, the intuition behind using MF is that there should be some latent features that determine how a user interacts an AP. The experiments done reported good predictions for \(K=4\), so these factors could be, apart from typical success login and wrong login, connection time and signal strength, for example. With regard to \(\beta\) and \(\lambda\), we ran a set of experiments in the similar context considering the same values for both them: 100, 75, 50, 25, 10, 5, 2.5, 1, 0.5, 0.1, 0.05, 0.01, and 0.005. We found out that the pair {\(\beta=1\), \(\lambda=75\)} reported the minimum prediction error.