# A CNN-Based Advertisement Recommendation through Real-Time User Face Recognition
## 4 Experiments
### Experiment Design  
For the evaluation of the CNN-based advertisement recommender system, two experiments were performed. In the first experiment, the accuracy of the CNN-based rating prediction model was measured. The extracted user's face image was represented as a matrix in 3D, and the difference between the current image matrix and the previous image matrix was obtained; this is defined as a face change image. A CNN-based rating prediction model was trained on the obtained face change image over time to construct a rating prediction model, as explained in Section 3.3. As the dataset of this study is small, we use the LOOCV (leave-one-out cross validation) method, which showed good performance for learning fewer data. LOOCV is a method for evaluating the performance of a model using one sample as test data and the other \(n-1\) as training data from \(n\) data samples [57]. Therefore, there are \(n\) validations for one epoch, and the average of the validation accuracy is set as the accuracy of the model.  
To measure the accuracy of the CNN-based rating prediction model, this study used mean absolute error (_MAE_). _MAE_ has been used for the measurement and comparison  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{1}{c}{\multirow{2}{*}{**Characteristic**}} & \multicolumn{3}{c}{**Subjects**} \\ \cline{3-4}  & & **Frequency** & **\%** \\ \hline \multirow{2}{*}{Sex} & Male & 39 & 50.65 \\  & Female & 38 & 49.35 \\ \hline \multirow{6}{*}{Age} & \textless{}20 & 1 & 1.30 \\  & 20–21 & 8 & 10.39 \\  & 22–23 & 22 & 28.57 \\  & 24–25 & 20 & 25.98 \\  & 26–27 & 15 & 19.48 \\  & 28–29 & 7 & 9.09 \\  & 29\(>\) & 4 & 5.19 \\ \hline \multicolumn{1}{c}{Total} & 77 & 100.0 \\ \hline \hline \end{tabular}
\end{table}
Table 6: The demographic information of users.  
of average performance errors of a model, and has the advantage of being robust to outliers [6; 7; 57; 58]. The _MAE_ is calculated as in Equation (4):  
\[MAE=\frac{1}{N}{\sum_{i}^{N}|y_{i}-\hat{y}_{i}|}\left(\begin{array}{c}N:\text {\emph{the number of data}}\\ y_{i}:\text{\emph{actual value}}\\ \hat{y}_{i}:\text{\emph{predicted value}}\end{array}\right) \tag{4}\]  
In the second experiment, the accuracy of the advertisement recommendation model for new users was measured. The users' keypoint score (KPS) by time was calculated through the proposed SIFT algorithm-based KPS calculation method using the extracted user's face image. Similar users to a target user were searched by obtaining a cosine similarity of each user's KPS for a specific time, as shown in Equation (3). The advertisement recommender system recommends _Top K_ advertisements for the target user, which are selected based on similar users' preferred advertisements. To measure the accuracy of the advertisement recommender system, this study used a recommendation hit ratio (_RHR_), defined as shown in Equation (5).  
\[RHR@K=\frac{n(User^{\prime}sTop-K\cap RecommendedTop-K)}{K} \tag{5}\]  
where a user's _Top-K_ is defined as the top _Top-K_ advertisements in which the advertisements preferred by the target user are arranged in descending order.