# A Hybrid Ontology-Based Recommendation System in e-Commerce
## 3 The Hybrid Ontology-based Approach
### Rules Approach
Figure 4 shows an example of the vector of features for three Products. We can see that Product 1 holds a Price that is between MinPrice and MaxPrice of the User's (value=1). Other than that, we can also see the respective Neighbour has given an overall rating of 5, which is the maximum value of an overall rating. The most 5 common words used in all the revisions of the Product are in the list of 200 most common words of the respective category given to the revisions with an overall rating of 4 and 5, which is also the maximum value. On the other hand, the Price of Product 2 is not in within range of MinPrice and MaxPrice of the User (value = 0); the respective neighbor gives a rating of 3, and only 2 words of the TopFiveWords are in the list of 200 most common words of the respective category given to the revisions with a rating of 4 and 5. Figure 4: Creation of the vector of features to each Product. The final step, after normalizing all the columns with a value between 0 and 1, is calculating the Euclidean distance between the Products Vector of features and the Vector of features P1. The system will recommend the K Products with the lowest Euclidean distance values to the User. ## 4 Experimental Evaluation

In the experimental evaluation, we assess the performance of the proposed hybrid ontology-based recommendation system on two metrics: performance time to apply the KNN algorithm to Neighbours and then to Products, and the quality of the recommended products to the active user. In order to perform the evaluation of our work, we compare the hybrid ontology-based recommendation system that we propose in this paper, to a collaborative filtering approach, which means that in the second one, we also apply the KNN algorithm to Neighbours and Products. To do this, we only consider the preferences of the active user to find his Neighbours and to find the Products we only consider the rating given by Neighbours. For both versions of the recommendation system, we first compare the performance time of the applying KNN to find the nearest Neighbours. That is the time taken to create the vector of features to all the Neighbours and the time to apply the Euclidean distance between them and the User. Secondly, we compare the performance time of applying KNN to Products, which consists of the time taken to create the vector of features for all the Products and the time taken to apply the Euclidean distance to find the best Products to recommend to the active user. We also intend to do a comparison between the number of nearest Neighbours and the number of nearest Products. To achieve this, we test the results when the number of nearest Neighbours is 1, 3 and 5 and when the number of nearest Products is 1, 3 and 5 which gives a total of 9 possibilities. This section shows the results of the tests described above and their respective conclusions. In order to perform them, we randomly choose 4 users who have made revisions in our Reviews Database. Figure 5 shows the profile of the four active users to which our hybrid ontology-based system will recommend new products. Figure 5 also shows the number of Neighbours of each active user and the time to apply KNN to find those Neighbours for both versions of the recommendation system. In order to help understand the experimental evaluation, the version of the recommendation system that concerns the hybrid ontology-based is called version A (see Figure 6), and version that concerns the collaborative filtering with KNN to find nearest Neighbours and Products is called version B (see Figure 7). In the next sections are detailed the results obtained in the experiments. Figure 5: User Profiles to experimental evaluation. Figure 6: Version A of the recommendation system, and Products recommend to each active User. ### Time Performance of Applying KNN to Find Nearest Neighbours

Figure 5 presents the performance time of applying the KNN algorithm to find nearest Neighbours of both approaches, which consists of the time to create the vector of features and calculate the Euclidean Distance.