## 3 Intelligent Content Prefix Classification Techniques
### Performance Evaluation of Various AI Algorithms
#### 3.1.2 Cost Function (CF)  
CF is a measurement of the cost utilization which manages the resource needed to satisfy the objective function. CF values of the selected algorithms are then examined to observe each algorithm's cost efficiency. CF can be calculated using the analytic hierarchy process (AHP), as identified by previous work [5], based on the ability to vary the weighting factors and the optimized cost is selected among different parameter preferences. AHP can also adopt different units of various parameters for QoS into normalized cost value from the cost function. Consider a set of candidate Algorithm \(A_{N}=\{A_{1},A_{2},...\ A_{n}\}\) and a set of quality of service factors \(q_{m}=\{q_{1},\,\ldots,q_{m}\}\), where \(n\) is the number of candidate algorithms and m is the total number of QoS factors. Supposed that each QoS factor \(q_{j}\) has weight value \(W_{j}\), and this weight shows the effect of the factor on the CF algorithms as following:  
\[A_{N}=\ \sum_{j=1}^{M}q_{j}\ \times\ W_{j} \tag{2}\]  
The relative scores among the QoS score set can be calculated using Equation (3), where \(R_{q_{i}q_{j}}\) is the relative score between parameters \(q_{i}\) and \(q_{j}\), and \(S_{q_{i}}\) and \(S_{q_{j}}\) are their respective scores. \[\left\{ \begin{array}{ll}R_{q_{i}q_{j}}=\left(1-\ \frac{S_{q_{i}}}{S_{q_{j}}} \right)\times 10&;\ j>i\\ R_{q_{i}q_{i}}=\frac{1}{R_{q_{i}q_{j}}}&;\ j<i\\ R_{q_{i}q_{j}}=1&;\ i=j\end{array} \right. \tag{3}\]  
\(X=\left\{X_{ij}\right\}\) is a \(M\times M\) matrix which \(X_{ij}\) represents the priority scores of each factor, is initialized as follows:  
Figure 2: Average number of function evaluation. \[X=\left[ \begin{array}{cccccc}1&R_{q1q2}&R_{q1q3}&R_{q1q4}&R_{q1q5}\\ \dfrac{1}{R_{q1q2}}&1&R_{q2q3}&R_{q2q4}&R_{q2q5}\\ \dfrac{1}{R_{q1q3}}&\dfrac{1}{R_{q2q3}}&1&R_{q3q4}&R_{q3q5}\\ \dfrac{1}{R_{q1q4}}&\dfrac{1}{R_{q2q4}}&\dfrac{1}{R_{q3q4}}&1&R_{q4q5}\\ \dfrac{1}{R_{q1q5}}&\dfrac{1}{R_{q2q5}}&\dfrac{1}{R_{q3q5}}&\dfrac{1}{R_{q4q5}} &1\end{array} \right] \tag{4}\]  
Then the normalized relative weight of \(X_{ij}\) in Equation (5) is obtained when each element of the matrix \(X\) is divided by the summations of its column in Equation (4):  
\[X_{ij}=\dfrac{X_{ij}}{\sum_{i=1}^{M}X_{ij}} \tag{5}\]  
The normalized matrix \(X\), \(w_{norm}\), is shown in Equation (6):  
\[w_{norm}=\left[ \begin{array}{cccc}w_{11}&w_{12}&w_{13}&w_{14}&w_{15}\\ w_{21}&w_{22}&w_{23}&w_{24}&w_{25}\\ w_{31}&w_{32}&w_{33}&w_{34}&w_{35}\\ w_{41}&w_{42}&w_{43}&w_{44}&w_{45}\\ w_{51}&w_{52}&w_{53}&w_{54}&w_{55}\end{array} \right] \tag{6}\]  
Next, the average values of each row are calculated to give the priorities for each factor as shown in Equation (7):  
\[\overline{w_{i}}=\dfrac{w_{i1}+w_{i2}+w_{i3}+w_{i4}+w_{i5}}{5} \tag{7}\]  
From this, we build the normalized vector \(W_{j}\) which is also the priority vector as it shows the relative weights among its elements. Note that the sum of all the elements in priority vector is 1:  
\[W_{j}=\left[ \begin{array}{c}\overline{w_{1}}\\ \overline{w_{2}}\\ \overline{w_{3}}\\ \overline{w_{4}}\\ \overline{w_{5}}\end{array} \right] \tag{8}\]  
Since \(W_{j}\) it is normalized from this, the set of QoS parameters where the sum of all the elements in priority vector is 1, denoted by the following vector:  
\[q_{j}=\left[ \begin{array}{cccccc}S&D&E&R&V\end{array} \right] \tag{9}\]  
where five parameters including SINR (S), delay (\(D\)), energy (\(E\)), RSSI (\(R\)), and velocity (\(V\)) are used as the QoS cost function parameter. The cost function is a measurement of the cost utilization to manage the resource needed to allocate for serving the user request with specified QoS requirements. In the context of future wireless networks, [21] predicted that the mobile users will mainly generate content traffic, hence, we consider QoS mobility for user mobility as a QoS factor. The SINR factor is selected to adapt the QoS to the network quality condition and to ensure that the PoA gets good signal quality.