<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">OALibJ</journal-id><journal-title-group><journal-title>Open Access Library Journal</journal-title></journal-title-group><issn pub-type="epub">2333-9705</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/oalib.1110009</article-id><article-id pub-id-type="publisher-id">OALibJ-125344</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Biomedical&amp;Life Sciences</subject><subject> Business&amp;Economics</subject><subject> Chemistry&amp;Materials Science</subject><subject> Computer Science&amp;Communications</subject><subject> Earth&amp;Environmental Sciences</subject><subject> Engineering</subject><subject> Medicine&amp;Healthcare</subject><subject> Physics&amp;Mathematics</subject><subject> Social Sciences&amp;Humanities</subject></subj-group></article-categories><title-group><article-title>
 
 
  Design and Implementation of a Recommender System for Tourist Visit Management
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Christophe</surname><given-names>Lwanyi Ashimalu</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Simon</surname><given-names>Ntumba Badibanga</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Pierre</surname><given-names>Kafunda Katalay</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Department of Mathematics, Statistics and Computer Science, University of Kinshasa, Kinshasa, Democratic Republic of the Congo</addr-line></aff><pub-date pub-type="epub"><day>30</day><month>04</month><year>2023</year></pub-date><volume>10</volume><issue>05</issue><fpage>1</fpage><lpage>17</lpage><history><date date-type="received"><day>14,</day>	<month>March</month>	<year>2023</year></date><date date-type="rev-recd"><day>28,</day>	<month>May</month>	<year>2023</year>	</date><date date-type="accepted"><day>31,</day>	<month>May</month>	<year>2023</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  Recommender systems are currently applied in many fields. They try to provide users with recommendation services based on their personalized preferences to reduce the ever increasing amount of information online. With the number of mobile phone users growing exponentially, travel guides have become an increasingly important search tool in recent years. Of course, we are not and will not be the first to implement a prototype to offer recommendations to users (tourists). Our particularity and/or novelty in this paper is to present a recommendation system to capture the optimal route taking into account both cost and distance constraints. The open dataset used covers information on tourist trip reviews of thousands of tourists who have visited different attractions in Italy and around the world. An association rule based on the exploratory approach will take into account the contextual information of the user's actual location to produce a dataset to be followed. In addition, a case study on tourism, Tourist visits, is implemented to verify the feasibility and applicability of the proposed system. The results of this work indicate that the proposed system has great potential to prepare the planning of tourists based on the use of mobile phones.
 
</p></abstract><kwd-group><kwd>System</kwd><kwd> Recommendation</kwd><kwd> Constraints</kwd><kwd> Association Rules</kwd><kwd> Exploratory Approach</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>This study is structured around four main points. First, a historical overview of recommender systems will be given. This is followed by an analysis of the engineering behind the operation of a recommender system. Next, the notions of association rules and the ROC curve will be discussed. Finally, the analysis of the InfTech_Tourism<sup>1</sup> data will allow us to implement a prototype recommendation system for the management of tourist visits. As can be seen, we will follow the analytical-expositive method.</p></sec><sec id="s2"><title>2. Development: Recommendation Systems</title><p>Every day of our lives we are confronted with choices to be made, even without wanting to: What to wear? Which product to buy? What clothes to wear? Where to travel on holiday? ... Even though recommender systems are applied in different areas of life, they share the same objectives: to help users make useful choices.</p><p>The scope of these decision areas is very wide. The possibilities they can offer are numerous. Evaluating them to find what is best for them is a very difficult and delicate task, and can be very time-consuming.</p><p>According to Idir BENOUARET, the ability of computers to make recommendations to users was quickly recognized in the history of computing ( [<xref ref-type="bibr" rid="scirp.125344-ref1">1</xref>] , p. 9). Quoting Grandy RICH, the author continues “the first step towards recommendation systems was precisely to develop an automatic library management system in the late 1970s” ( [<xref ref-type="bibr" rid="scirp.125344-ref1">1</xref>] , p. 9).</p><p>Although this work was the first serious and interesting attempt to implement a recommender system, its use remained very limited. Its weakness was that it classified users into stereotypes on the basis of a brief interview and used these stereotypes to produce recommendations about books. This gave rise to what would later be called information overload.</p><p>So, in order to solve this famous problem of information overload, collaborative filtering was born around the 1990s. Nowadays, there are several types of recommender systems. Recommendation systems are classified according to the approach used to estimate the missing scores.</p><sec id="s2_1"><title>2.1. Content-Based Filtering</title><p>The user will be recommended items that are similar (in the sense of a similarity measure between items) to those he/she has preferred in the past. In order to better understand this method, it is necessary to analyze it in a tripartite approach, the quintessence of which is as follows:</p><p>・ Based on the objects already evaluated and/or selected: Item-Item</p><p>・ Based on the user’s profile: User-Item</p><p>・ Based on the use of a model</p><sec id="s2_1_1"><title>2.1.1. The User Profile</title><p>・ Important criteria</p><p>・ Consideration of</p><p>=&gt; Boolean comparisons</p><p>=&gt; Model generation</p></sec><sec id="s2_1_2"><title>2.1.2. Disadvantages</title><p>・ Requires descriptive content, difficult for films</p><p>・ Lack of serendipity<sup>2</sup></p><p>・ Easily misses interesting recommendations</p></sec><sec id="s2_1_3"><title>2.1.3. Developments</title><p><xref ref-type="fig" rid="fig1">Figure 1</xref> shows the content-based system.</p><p>・ Use of the Semantic Web</p><p>・ Data description: XML, RDF [<xref ref-type="bibr" rid="scirp.125344-ref2">2</xref>]</p></sec></sec><sec id="s2_2"><title>2.2. Collaborative Filtering Method [<xref ref-type="bibr" rid="scirp.125344-ref2">2</xref>] - [<xref ref-type="bibr" rid="scirp.125344-ref7">7</xref>]</title><p>The user will be recommended items that other users with similar tastes and preferences (in the sense of similarity between users and items) have liked in the past.</p><p>・ Based on users who are considered similar</p><p>・ Determination of user groups [Aggregative method and Centralized method]</p><p>・ Content independent, human factor (aesthetics)</p><p>・ Any form of content can be involved as long as a human can appreciate it</p><p>・ Rating matrix</p><p>Collaborative filtering is a type of recommendation engine that uses both user data and item data, specifically, individual users’ ratings of individual items. In this way, items are recommended based on the ratings of other users, thus collaborative. This data can be represented in a utility matrix, with one axis being the users and one axis being the articles. The aim of collaborative filtering recommendation engines is to fill in the gaps in a utility matrix, as not all users have rated each item, and then to produce the highest rated and previously unranked items as recommendations. (<xref ref-type="fig" rid="fig2">Figure 2</xref>)</p><sec id="s2_2_1"><title>2.2.1. Memory-Based Algorithms</title><p>・ Establish a vote prediction for the user</p><p>・ Use the average of votes for a user</p><p>・ Define similarity between users: Pearson correlation, vector similarity...</p></sec><sec id="s2_2_2"><title>2.2.2. Problems Related to Filling the Matrix</title><p>・ Problem of the first vote</p><p>・ Scattered votes</p><p>・ Requires many votes for relevance</p></sec><sec id="s2_2_3"><title>2.2.3. Scoring Matrix</title><p>There are three main techniques for populating the utility matrix using the collaborative filtering method: User-User, Item-Item and Singular Value Decomposition (SVD). We will go through each of these using our simple utility matrix above to try and predict what User 1 would rate Item 3. (<xref ref-type="fig" rid="fig3">Figure 3</xref>)</p></sec><sec id="s2_2_4"><title>2.2.4. User to User</title><p>There are two main steps in calculating the missing value of our utility matrix:</p><p>・ Calculate the similarity between U1 and all other users</p><p>・ Calculate U1’s score for I3 by taking an average of the other users’ I3 scores, weighting each user’s score by the user’s similarity<sup>3</sup> to U1.</p><p>Example (<xref ref-type="fig" rid="fig4">Figure 4</xref>):</p></sec><sec id="s2_2_5"><title>2.2.5. Item to Item</title><p>Item to Item collaborative filtering is much the same as User to User, but instead of calculating the similarity between users, it is calculated between Items. The final value calculated is then an average of the other scores in U1, weighted by the similarity of I3 to other items.</p><p>Example (<xref ref-type="fig" rid="fig5">Figure 5</xref>):</p><p>Adopting the Item to Item approach, we obtain a prediction value of 3.31―very different from the previous value of 4.34. However, a few observations are worth highlighting:</p><p>・ When calculating similarity, some sources ask to treat missing values as 0 while others simply omit the entire row/column with the missing value in the similarity calculation.</p><p>・ In general, the Item to Item approaches have been more effective due to the unique tastes of users.</p><p>・ When deciding whether to use the User to User or Item to Item approach, it is advisable to consider the complexity of the algorithm. If we have m Users and n Items, the time complexity would be O (m<sup>2</sup>n) for User to User and O (mn<sup>2</sup>) for Item to Item. We can decide to choose Item to Item if and only if we have more users and vice versa.</p></sec><sec id="s2_2_6"><title>2.2.6. Singular Value Decomposition (SVD)</title><p>Let’s start with some theory to understand where these concepts come from. Singular value decomposition (SVD) is a form of matrix factorization. Matrix factorization decomposes a matrix into a product of (usually three) matrices. In algebra, when we factor quadratic equations into their linear parts (i.e. x&#178; + 2x + 1 = (x + 1) (x + 1)), it is a similar idea.</p><p>SVD is the model made famous by Simon Funk in the Netflix Prize competition in 2007. Singular value decomposition is usually performed by using the eigenvalues and eigenvectors of a matrix to decompose it into three-component matrices. The name of the algorithm used in the Python libraries to solve recommendation engines is called SVD, but it does not exactly factor the utility matrix. Instead, it does something of the reverse of SVD and tries to recreate the utility matrix using not three, but two component matrices. These two matrices, as illustrated below (<xref ref-type="fig" rid="fig6">Figure 6</xref>), can be interpreted as the Item matrix and the User matrix.</p><p>Example:</p><p>The latent features simply refer to an abstraction of all the features of the Items or Users. As long as the same number of latent entities is available for the Items and Users, the matrices can be multiplied to produce a single matrix with the same dimensions as the utility matrix. The number of latent entities is a hyperparameter that can be set in the model. Based on the matrix multiplication, one can also see that the evaluation value of U1 for I3 is affected by the row I3 of the Items matrix and the column U1 of the Users matrix.</p><p>Because we cannot decompose the matrices with missing values, we have to take another approach. This is where machine learning comes in. Now we need to recreate the utility matrix with our Items matrix and our Users matrix. This is done using the gradient descent method known as Alternating Least Squares (ALS). (<xref ref-type="fig" rid="fig7">Figure 7</xref>)</p><p>1) The cost function</p><p>In this model, the cost function is a measure that allows us to compare the corresponding values in our original utility matrix and our recreated utility matrix. This means that we compare the valuation of U1-I1 in the original utility matrix, 4, with the valuation of U1-I1 in my recreated matrix, 2, and I do the same for all matrix values.</p><p>2) Gradient descent with the alternating least squares technique</p><p>Gradient descent works by trying to minimize the cost function (RMSE) by changing one value at a time in a component matrix. Let’s start by finding the optimal value of the first latent feature of I1 in the component matrix.</p><p>Example:</p><p>As shown in <xref ref-type="fig" rid="fig8">Figure 8</xref>, by changing this first value (now denoted x unknown), we update the entire first row of our recreated utility matrix. Thanks to matrix multiplication, this whole first row becomes x + 1. Because the rest of the matrix is static, we can simply minimize our cost function on this first row. So we simply minimize this quadratic equation to get an optimal x of 2.5.</p><p>By replacing the x with 2.5, the first row of our recreated utility matrix becomes a row of 3.5, and our RMSE goes from 1.75 to 1.58! (<xref ref-type="fig" rid="fig9">Figure 9</xref>) This process is repeated again and again until RMSE cannot improve. It should be noted that changing a value, either in the Item matrix or in the User matrix, changes an entire row or column of the recreated utility matrix. This maintains the relationships between Users and Items, and this process is known as parallelization. By repeating this process over and over again we end up with an RMSE of 1.15, and this is what our recreated utility matrix looks like (<xref ref-type="fig" rid="fig1">Figure 1</xref>0):</p><p>3) Evaluation</p><p>On this basis, we can guess that the U1 score of I3 is 3.7! In a sparser matrix with several unknown ratings per User, you would then recommend the highest previously unrated Item. Interestingly, compared to our User to User (4.34) and item to Item (3.31) predictions, our SVD value of 3.7 lies between the use of similarities between the two different axes.</p><p>In practice, with much more data, one would have to measure the RMSE on the actual evaluation values one has in the test set with their predicted model values. This RMSE would be what is used to evaluate the model, not to be confused with the RMSE used as a cost function in this alternating least squares gradient descent. And this RMSE can be interpreted as the average deviation from the actual score of the predicted score.</p></sec></sec></sec><sec id="s3"><title>3. Hybrid Method: Combining the Two Previous Methods [<xref ref-type="bibr" rid="scirp.125344-ref2">2</xref>] [<xref ref-type="bibr" rid="scirp.125344-ref5">5</xref>] [<xref ref-type="bibr" rid="scirp.125344-ref7">7</xref>]</title><p>This approach combines the multiple filtering methods to obtain a refined result.</p><p>The principle is to use a user’s interests as input to generate a list of recommended products. Many commercial applications rely solely on the products that customers purchase and explicitly rate them to represent their interests, but such systems can also take into account other attributes, including products viewed, demographics and favorite artists. (<xref ref-type="fig" rid="fig1">Figure 1</xref>1)</p><p>In recommender systems, the usefulness of an item is usually represented by a score that indicates how a particular user liked a particular item.</p><p>The main problem to be solved is the estimation of scores for items that have not yet been rated by a user. The number of items as well as the number of users in the system can be very large. It is therefore difficult for each user to see all items or for each item to be evaluated by all users. Where it is possible to estimate scores for items not yet rated, items with the highest estimated scores can be recommended to the user.</p><p>Although recommender systems can recommend relevant items to a user, they are ineffective when new items are added to the catalogue or when the users are different or new. This cold-start problem is encountered when recommendations are needed for items or users for which we have no information either explicitly or implicitly. There are therefore two cold-start problems: new user and new item.</p><p>The different criteria for combining the different recommendation filtering techniques are classified as follows:</p><p>・ Separate implementation of content-based methods and fusion of their predictions;</p><p>・ Integrating some content-related features in a collaborative approach:</p><p>・ Integrating some collaborative features into a content-based approach:</p><p>・ Development of an integrated general model that merges the features of content-based methods and collaborative filtering.</p><p>This method reduces filtering problems because the advantages of one technique can be used to minimize the disadvantages of another.</p></sec><sec id="s4"><title>4. Association Rules and Receiver Operating Characteristic Curve (ROC)</title><p>An association rule is an implication of the form A → B that models the fact that a set of resources B is often consumed or accessed when a set of resources A has been consumed or accessed. A is then called antecedent, and B consequent.</p><p>An association rule A → B has a certain predictive capacity which is measured according to two criteria, called support and confidence. The support s of an association rule A → B is the number of occurrences of transactions in D that contain A∪B.</p><p>Normalization has no real use, and is usually used to allow talking in terms of probabilities or percentages. However, when faced with a very large data space, the probabilities and percentages thus obtained become very low, and no longer facilitate reading.</p><p>The confidence c of an association rule A → B is the conditional probability of transactions containing B knowing that they contain A (for a uniform distribution on D), i.e., c(A → B) =P(B|A) = s(A → B) s(A).</p><p>The first task in using association rules is to discover these rules by searching a database. It is obviously impossible to list all the rules that can be constructed from this data, as the combinatoriality is so great. Consequently, only the rules with the best predictive value are retained. This first step is carried out in two sub-steps:</p><p>・ Search for rules with a support higher than the predetermined threshold;</p><p>・ Deduction of the confidence values of these rules and deletion of the rules with a confidence below the predetermined threshold.</p><p>To further reduce the number of resulting rules, the notions of closed sets and maximum frequency sets can be used. Closed set A closed set is a set for which there is no superset with the same support. Maximum frequency set A maximum frequency set is a set with a support value greater than the predetermined threshold and for which there is no superset with a support value greater than the predetermined threshold.</p><p>Using the notion of a closed set allows the same information to be extracted in a more compact way, whereas using the notion of a maximum frequency set allows the number of rules to be reduced even further but implies a certain loss of information. Several algorithms have been proposed to extract rules according to these two principles. (<xref ref-type="fig" rid="fig1">Figure 1</xref>2)</p><p>An ROC curve allows the comparison of recommendation algorithms regardless of the quality of the predictions. ROC measures the point at which an information filtering system can successfully distinguish relevant from irrelevant items. In addition, this measure evaluates the order in which recommendations are presented (rank). For this purpose, this curve relates the false positive rates (on the x-axis) to the true positive rates (on the y-axis) in a graph. (<xref ref-type="fig" rid="fig1">Figure 1</xref>3)</p><p>From the above, it can be stated that a recommender system performs mainly three actions:</p><p>・ Extraction of people’s preferences from the input data;</p><p>・ Computing recommendations;</p><p>・ Presentation to people (users);</p><p>・ Apart from the cold-start problem, there are two other gaps worth mentioning:</p><p>- Discovery: a list of articles suggested by a Recommender System should allow the user to explore new products as well. Excessive similarity between articles is not very useful in this case and often the user also wants to explore new types of articles compared to the usual ones [<xref ref-type="bibr" rid="scirp.125344-ref8">8</xref>] .</p><p>- Filters Bubbles: to identify the information left by the algorithms to the user, E. PARISER introduced the concept of filters bubbles [<xref ref-type="bibr" rid="scirp.125344-ref9">9</xref>] . According to the author, the filter bubble phenomenon is verified when the user finds himself confined in an imaginary bubble built by algorithms and allowing only the passage of certain information. In this way, the user risks creating a partial, not to say limited, view of many facts.</p><p>The information analyzed so far does not take into account the context. However, several research studies have shown that contextual information is of paramount importance in the implementation of a recommender system.</p><p>The results of various studies have shown a significant difference in rating predictions using relevant and irrelevant contextual information. This allows us to confirm not only the positive but also the significant impact of contextually relevant information on the non-contextualized model.</p><p>In order to carry out this work, it seems essential to carry out a study on the online reviews of travelers and/or tourists. The aim is to describe the application of a series of intelligent data analysis techniques to a large number of online travel reviews, in order to automatically extract useful information.</p><p>The comments collected from two famous online tourism review platforms, are all those published by customers on specific Italian sites, from 2010 to 2017. A preliminary statistical analysis is performed to gain general knowledge about the subject of the data set, such as the geographical distribution of the reviewers, their activities and comparison between the visit time and the average review score.</p><p>Then, natural language processing techniques are applied to extract and compare the most commonly used words on the two platforms. Finally, an association rule learning algorithm is applied to extract favorite destinations from distinct groups of reviewers.</p><p>If necessary, the automatically extracted information will be used to create a prototype recommendation system to suggest the best destinations to tourists while taking into account both the constraints related to the cost of the visit ticket and the distance to travel from the user’s current location. This will make this work a real market analysis tool for the different service providers.</p><p>Since generally “potential travelers tend to rely on the statements of others earlier than on the advertisements of tourism service providers, social networks are an important platform for e-commerce and have one of the most metamorphic impacts on commerce” ( [<xref ref-type="bibr" rid="scirp.125344-ref10">10</xref>] , p. 2).</p><p>Notwithstanding the fact that a lot of information on tourism transactions, customer behaviours, facilities and/or accommodation structures can be found easily and abundantly on the Internet, several studies have been devoted to the analysis of this data. The information obtained can be seen from the point of view of the customer or the service provider. Let’s try to get to the bottom of it.</p><p>The study of behavioral patterns and user preferences can be useful information for companies insofar as it guides the definition of strategies and offers of added value in marketing to customers but also in the new preferred destinations of the world in the case of tourism.</p><p>Since online opinions have the potential to transform the way we do business, working on them, analyzing the motivations of different types of users (buyers of services or sellers) when sharing information and comments online; the impact of the type of sharing on e-commerce are very important ( [<xref ref-type="bibr" rid="scirp.125344-ref11">11</xref>] , p. 4-5).</p><p>From the customer’s point of view, the same authors analyzed TripAdvisor reviews to implement the useful planning tool for travelers as a decision support system. In the dataset description, the authors address the problems of extracting data on multimodal aspects and consider user-generated photos and text documents to capture correlations between aspects and opinions ( [<xref ref-type="bibr" rid="scirp.125344-ref11">11</xref>] , p. 5).</p><p>More and more users are describing their travel experience on websites. Many comments are generated online every day. This makes it difficult for users to identify useful reviews in a reasonable time frame. Predicting the relevance of reviews allows the user to focus only on the most important ones. This saves time even though usually the implicit assumption is that comments are independent of each other.</p><p>In view of what we have just presented, it is now appropriate to implement a prototype recommendation system for tourists. To do this, let us try to analyze the dataset. This dataset contains all the attractions or probable places to visit that are located in the Tuscany region (Italy). Initially saved in .JSON format, the Dataset contains eight attributes, including “ta_id”, “name”, “ratingValue”, “country”, “region”, “locality”, “postal_code”, “street_address”.</p><p>It is not the intention here to analyze each attribute. However, it should be noted that other attributes have been added to the initial dataset. These include: “price”, “latitude”, “longitude”, “altitude”, “location”.</p><p>The geopy function allows us to go from the physical address to the geographical coordinates and/or from the geographical coordinates to the physical address. The Package and Library Pandas, Numpy contain the necessary tools for the implementation of our recommendation system prototype.</p><p>The technique adopted in this work is singular value decomposition which applies least squares logic to minimize both the distance and the cost of the ticket. This technique allowed us to highlight the two initial constraints in order to suggest useful destinations to the user for their choice.</p><p>The Tourist Visits Recommender System is implemented in the following steps:</p><p>1) Decide on the metric (in this case cost and distance minimization);</p><p>2) Calculate the distance between the user’s actual position and the different locations;</p><p>3) Consider the cost of the ticket for each location;</p><p>4) Order the locations taking into account both the cost of the ticket and the distance to travel;</p><p>5) Select the best results for the chosen metric.</p><p>Let’s see how this should be done in practice (See Appendix).</p></sec><sec id="s5"><title>5. Conclusions</title><p>Our paper has three main axes. In addition to the historical overview, the aim was to expose and analyze the engineering behind any recommender system in order to model, in the last axis of this work, a prototype applicable to tourist visits.</p><p>From the noisy and sparse data recorded in .JSON format, we came to create a Dataset in .csv format containing the cleaned data that allowed us to design, model and better implement our Tourist Visits prototype to propose attractions (locations or sites) to tourists taking into account the constraints related to cost and distance.</p><p>Just as we wanted, the sites located in the client’s vicinity and with the lowest cost of access are ordered as shown in the last result. At this stage, we have all the reasons to affirm that our prototype can take into account any other reality and give the expected result. We say that the recommender system suggests useful results.</p></sec><sec id="s6"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest.</p></sec><sec id="s7"><title>Cite this paper</title><p>Lwanyi Ashimalu, C., Ntumba Badibanga, S. and Kafunda Katalay, P. (2023) Design and Implementation of a Recommender System for Tourist Visit Management. Open Access Library Journal, 10: e10009. https://doi.org/10.4236/oalib.1110009</p></sec><sec id="s8"><title>Appendix. Application: Prototype Recommendation System</title><p># Loading of package, module and library</p><p>import pandas as pd</p><p>import pandas as np</p><p>import geopy</p><p>import csv</p><p>from geopy import distance</p><p># Function to obtain the geographical coordinates</p><p># [altitude, latitude, longitude] from a physical address</p><p>def getlatlong(loc):</p><p>return loc.latitude, loc.longitude</p><p># Loading of Dataset and visualisation of its first five lines</p><p>df = pd.read_csv(“D:/Christophe/attraction.csv”, encoding = “latin-1”)</p><p>df.head()</p><p># Removal of attributes that do not have considerable entropy here &quot;ta_id&quot;.</p><p>df_new = df.drop(“ta_id”, 1)</p><p># Dataset size</p><p>print (’We have ‘, len(df_new), ‘Site in Data)</p><p>We have 487 Site in Data</p><p># Data Preprocessing</p><p># Loading the dataset containing the geolocation attributes</p><p>data = pd.read_csv(“D:/Christophe/attraction_geo.csv”)</p><p>data.head()</p><p># Adding the &quot;price&quot; attribute</p><p>data.insert(5, “price”, df[“price”], True)</p><p>data.head()</p><p># Creation of a dictionary to recursively calculate the distance between the actual position</p><p># and the different attractions [locations].</p><p>with open(“D:/Christophe/attraction_geo.csv”, “r”) as f:</p><p>locations = { }</p><p>d = csv.reader(f)</p><p>next(d)</p><p>for el in d:</p><p># Visualiser el</p><p>locations [el[<xref ref-type="bibr" rid="scirp.125344-ref0">0</xref>]] = geopy.location.Location(el[<xref ref-type="bibr" rid="scirp.125344-ref0">0</xref>], (el[<xref ref-type="bibr" rid="scirp.125344-ref1">1</xref>], el[<xref ref-type="bibr" rid="scirp.125344-ref2">2</xref>]))</p><p># Example of how to calculate the distance between two locations</p><p>distance.distance(getlatlong(locations['Palazzo Pfanner, Via Degli Asili 33, Lucca, Italia']), getlatlong(locations['Bagno Chimera, Viale Roma 21 Loc. Fiumetto, Marina di Pietrasanta, Italia']))</p><p>Distance(27.321540765341144)</p><p># Creation of a list &quot;myList</p><p># Insert all calculated distances</p><p>myList = [<xref ref-type="bibr" rid="scirp.125344-ref"></xref>]</p><p>for site in locations:</p><p># print (site)</p><p>dist = distance.distance(getlatlong(locations['Palazzo Pfanner, Via Degli Asili 33, Lucca, Italia']), getlatlong(locations[site]))</p><p>print (dist)</p><p>myList.append(float(dist.kilometers))</p><p>0.0 km</p><p>0.38764556260983907 km</p><p>0.2509674159974559 km</p><p>0.27999638285417033 km</p><p>7.222279728441458 km</p><p>...</p><p># Removal of attributes that do not add anything</p><p>data.drop(['address', 'latitude', 'longitude', 'altitude'], axis = 1, inplace = True)</p><p>data.head()</p><p>location price</p><p>0 Palazzo Pfanner, Via Degli Asili 33, Lucca, It... 15</p><p>1 Torre Guinigi, Via Sant'Andrea 45, Lucca, Italia 9</p><p>2 Piazza Anfiteatro, None, Lucca, Italia 0</p><p>3 Puccini Museum - Casa natale, Corte San Lorenz... 7</p><p>4 Parco Villa Reale, Via Fraga Alta 2, Capannori... 15</p><p># Creation of the &quot;distance&quot; attribute which includes all the distances in the &quot;myList&quot; list</p><p>data['distance'] = myList</p><p>data.head()</p><p>location price distance</p><p>0 Palazzo Pfanner, Via Degli Asili 33, Lucca, It... 15 0.000000</p><p>1 Torre Guinigi, Via Sant'Andrea 45, Lucca, Italia 9 0.387646</p><p>2 Piazza Anfiteatro, None, Lucca, Italia 0 0.250967</p><p>3 Puccini Museum - Casa natale, Corte San Lorenz... 7 0.279996</p><p>4 Parco Villa Reale, Via Fraga Alta 2, Capannori... 15 7.222280</p><p># Sorting the dataset in ascending order with respect to the constraints related to</p><p># attributes ([&quot;price&quot;, &quot;distance&quot;])</p><p>data.sort_values(by=['price','distance'], inplace=True)</p><p>data.head()</p><p>location price distance</p><p>52 Domus Romana, Via Cesare Battisti 15, Lucca, I... 0 0.073359</p><p>7 Basilica of San Frediano, Piazza San Frediano,... 0 0.144291</p><p>282 Chiesa di Santa Maria Corteorlandini, Via S. M... 0 0.144477</p><p>2 Piazza Anfiteatro, None, Lucca, Italia 0 0.250967</p><p>9 San Michele in Foro, Piazza San Michele, Lucca... 0 0.266617</p></sec><sec id="s9"><title>NOTES</title></sec></body><back><ref-list><title>References</title><ref id="scirp.125344-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Benouaret, I. (2017) Un système de recommandation contextuel et composite pour la visite personnalisée des sites culturels. Thèse de doctorat, UTC, Compiègne.</mixed-citation></ref><ref id="scirp.125344-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">https://interstices.info/les-systemes-de-recommandation-categorisation/#:~:text=Les%20syst%C3%A8mes%20de%20recommandation%20sont,a%20pr%C3%A9f%C3%A9r%C3%A9s%20dans%20le%20passé</mixed-citation></ref><ref id="scirp.125344-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">https://www.spindox.it/blog/collaborative-filtering</mixed-citation></ref><ref id="scirp.125344-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Alchiekh Aldhar, C. (2014) Les systèmes de recommandation à base de la confiance. Thèse de Doctorat, Université de Lausanne.</mixed-citation></ref><ref id="scirp.125344-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">http://www.cfcopies.com/V2/leg/leg_droi.php</mixed-citation></ref><ref id="scirp.125344-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">http://www.culture.gouv.fr/culture/infos-pratiques/droits/protection.htm</mixed-citation></ref><ref id="scirp.125344-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Resnick, P. and Varian, H.R. (1997) Recommender Systems. Communications of the ACM, 40, 56-58. https://doi.org/10.1145/245108.245121</mixed-citation></ref><ref id="scirp.125344-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Shamboura, Q. and Lub, J. (2015) An Effective Recommender System by Unifying User and Item Trust Information for B2B Applications. Journal of Computer and System Sciences, 81, 1110-1126. https://doi.org/10.1016/j.jcss.2014.12.029</mixed-citation></ref><ref id="scirp.125344-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Pariser, E. (2011) The Filter Bubble: What the Internet Is Hiding from You? Penguin, UK.</mixed-citation></ref><ref id="scirp.125344-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Fazzollari, M. and Petrocchi, M. (2017) Mining Worse and Better Opinions Unsupervised and Agnostic Aggregation of Online Reviews. Institute of Informatics and Telematics, National Research Council, Pisa.</mixed-citation></ref><ref id="scirp.125344-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Fazzollari, M. and Petrocchi, M. (2017) Descrizione Dataset Reviewland. Inédit.</mixed-citation></ref></ref-list></back></article>