Recommendation system for web article based on association rules and topic modelling

The World Wide Web is now the primary source for information discovery. A user visits websites that provide information and browse on the particular information in accordance with their topic interest. Through the navigational process, visitors often had to jump over the menu to find the right content. Recommendation system can help the visitors to find the right content immediately. In this study, we propose a two-level recommendation system, based on association rule and topic similarity. We generate association rule by applying Apriori algorithm. The dataset for association rule mining is a session of topics that made by combining the result of sessionization and topic modeling. On the other hand, the topic similarity made by comparing the topic proportion of web article. This topic proportion inferred from the Latent Dirichlet Allocation (LDA). The results show that in our dataset there are not many interesting topic relations in one session. This result can be resolved, by utilizing the second level of recommendation by looking into the article that has the similar topic.


I. Introduction
Currently, the world wide web becomes a knowledge base for numerous information around the world.A lot of industry starts to utilizing the benefit of the world wide web, including tourism industry.Gretzel [1] said the internet is the primary source of information in the domain of tourism.With the in-creasing information of the tourism destination on the Internet, the traveler is no longer dependent on travel agents [2].The tourists prefer to seek information over the internet, even its an itinerary or individual reviews of each place.However, the internet can be overwhelming for the novice traveler due to various sources of information.The information that comes out is often not quite what they want.Recommendation system can be a tool to resolve the issue [3] and also provide useful information to help the user to make his choice.To be able to make a good recommendation, the system should be able to identify the user interests based on other users who have the same preferences [4].The analysis of the browsing pattern of users can provide valuable information to the website owner.Such analysis can be done by applying data mining technique into web data.
Web mining is referred to as the application of data mining technique to the web data [5].Web mining classified into three categories, namely the web usage mining, we content mining, and web structure mining [6].Web usage mining is a process of picking up information from the user how to use websites [7].The objective is to capture, model, and analyze the behavioral patterns and profiles of users interacting with a website [8].One way to achieve this goal is by using association rule mining.Web usage association rule mining has long been a traditional data mining method for automatic extraction of potentially interesting information about the behavior of the website visitors from the web usage log files [9].The most commonly used algorithms for association mining are Apriori [10].While this algorithm can discover meaningful association pattern, the problem of too much execution time and generating too many items due to URL variation exists [11].This issue can be resolved by utilizing content information from the web content mining process.
Web content mining is a process of picking up information from texts, images, and other contents [7].Mostly, web content can be seen as a text data or documents.Several analysis such as topic modeling can reveal the theme from the documents [12].Thematic information obtained from the content may also increase the understanding of the pattern generated from the web usage mining [13].

A B S T R A C T
The World Wide Web is now the primary source for information discovery.A user visits websites that provide information and browse on the particular information in accordance with their topic interest.Through the navigational process, visitors often had to jump over the menu to find the right content.Recommendation system can help the visitors to find the right content immediately.In this study, we propose a two-level recommendation system, based on association rule and topic similarity.We generate association rule by applying Apriori algorithm.The dataset for association rule mining is a session of topics that made by combining the result of sessionization and topic modeling.On the other hand, the topic similarity made by comparing the topic proportion of web article.This topic proportion inferred from the Latent Dirichlet Allocation (LDA).The results show that in our dataset there are not many interesting topic relations in one session.This result can be resolved, by utilizing the second level of recommendation by looking into the article that has the similar topic.In this study, we propose two-level recommendation, using association rule mining and topic modelling.We also aimed to prevent the twin problems that exists in Apriori by reducing the variations of itemset by utilizing topic modeling.Itemset that usually formed as a set of URL changed to become a set of the topic.In addition to reducing generated association rule, this combination can make the rule more meaningful because of thematic information that contained in the rule [14].This paper is organized into 5 sections.Section 1 describes the background, current technique, and the case study.Section 2 describes the related work of web mining.Section 3 de-scribes the proposed system of this study.Section 4 show the result and research findings.Finally, Section 5 summarizes the conclusion.

II. Related Work
The growth of users and contents on the World Wide Web can be an enormous potential for some website owner, to seek for interesting user behavior in their industry niche including tourism [1].User behavior can be seen by analyzing the usage data obtained from the web server.Examination of user actions in interacting with a website can offer insights causing to customization and personalization of a user's web practice [15].
Web Usage Mining can provide online recommendation effectively [16] .sunil [16] propose an architecture for online recommendation in Web Usage Mining System.The author presents the architecture of online recommendation in Web usage mining (OLRWMS) for improving the accuracy of clas-sification by the interaction between classifications, evaluation, and the current user activates and user profile in the online phase of this architecture.Another recommendation system proposed by Destyaputri [17]used three-level recommendation system based on association rule discovery, news articles in the same category, and similarity between news articles.By combining collaborative filtering approach and content-based filtering, experiment results show that the technique produces reliable news recommendation.
Association rule mining especially Apriori algorithm have been studied to uncover potential user browsing behaviors and creating recommendation [7] [18] [11].Rawat [7] customizes Apriori Algorithm to become custom-built apriori.The goal is to find effective pattern analysis.The author found that analyzing web logs can not only provide an interesting pattern but also help in creating an adaptive website.More trying to uncover the disadvantages of the apriori algorithm by com-paring with another algorithm, the results appear that apriori has more execution time than the other algorithm.Lazcoretta analyzes the process of discovering association rules in this kind of big repositories and of transforming them into user-adapted recommendations by the two-step modified Apriori technique.The results show that their approach can provide better recommendation services by analyzing the behavior of a single user by all other users of web-based information systems.
Web log data is the primary source for analyzing user behavior in the web usage mining.Such models can be extended by adding web content as a source for analyzing user behavior especially for the website that has an extensive content like news portal.The combination of both sources can make a significant improvement on the recommendation of news articles [19].Semantic analysis [17] or Topic Modeling [20] often be used to analyze the semantic meaning of the content, so it can be combined with log data to enrich the sense of the pattern.
In this research, we aim to combine the association rule mining with topic modeling.We use apriori as the algorithm for association rule mining, and enrich the association rule with Latent Dirichlet Allocation (LDA) [12].Apriori allows us to discover the association among user clicks.Meanwhile, LDA makes it possible to identify several topics under what the user clicks.By combining these two, we can produce a good recommendation for the future users.

III. Method
Our recommendation system built consisting offline and online phase.Offline phase aims to generate the knowledge base that will be used as the basis for recommendations on the online phase.There are two levels of the knowledge base that will be utilized as the basis for the recommendation.The first one is the association rules and the second is the similarity of content based on topic modeling.
Web content and web server logs are the primary sources for this recommendation system.These two sources are used to generate the first knowledge base which is association rules.Firstly, web server logs will be transformed into URL sessions.Then, web contents are processed in topic modeling to find the topic model.The result from both of these sources combined to generate the session topic.Each session topics is an item which becomes the input to the association rule mining.The output of the association rule mining is becoming the first knowledge base.The second knowledge base generates purely from the topic similarity of the document inferred by the result of topic modeling.The workflow of these offline process can be seen in Figure 1.The online phase then uses these knowledge base as the reference for the recommendation.When the user started to navigate the website, a set of topic item are shaped.As-sociation rules have the priority for the recommendation.A rule that has the highest support and confidence will become the recommendation.If there are no rules that match, then the similar document based on the topic distribution will be selected as the recommendation.The workflow of these online process can be seen in Figure 2.

Fig 2. Online Phase
The interaction between the users and the website is recorded on a web server logs.This log file has several relevant fields that were used for analysis such as the identity of the user and also the information on the accessed pages.Before these log files are ready for analysis, data cleaning is needed.There are four steps involved in the cleaning process.The first is eliminating request with the error status code (4xx and 5xx).The second step is to remove the request on the page that is not related to user activity such requests on images, videos, styles (CSS), and scripts (javascript).The next step is to eliminate requests on the page that are not directly related to content such as contact page, about, and sitemap.The last step is to eliminate the request made by robots, crawlers, or spiders.
After the logs data are cleaned, user and session need to be identified.A user can be recognized by the identical of IP address and user agent (Chitraa and Thanamani, 2011).Once the user is found, we need to identify the session.The simplest way can be achieved by looking at the timeout.Most commercial services using 30 minutes as the default timeout (Cooley et al, 1999).The output of this process is in the form of a URL session length n, and can be represented in (1): where the session   consist of URL    that belongs to session s with the length of L.

B. Topic Modelling
Topic modeling is a statistical method for discovering patterns and themes in the corpus of document [2] [12].In this study, we used Latent Dirichlet Allocation (LDA) that Introduced by Blei [12].LDA allows us to identify topics in web content.
In this research, web content acquired by the web scraping technique recursively to the entire address of the website.This content needs to be transformed into LDA corpus.This transformation consists of tokenization, stopword removal and forming into the bag of words.The output of LDA is a model that contains the topic with the probability of the word.This model can be used to find the document topic probability vector that represents the distribution of topics from each of the document.Document topic probability vector can be described in (2): Where   is document topic probability vector,      is the affinity of topic k on document i.This vector can be used to see the similarity between documents based on topic distribution, and used as a knowledge base for the second recommendation.

C. Session and Topic Model Combination
The output of the sessionization process is a series of URL.A URL included in the analysis contains an article.In gudegnet, there are more than 9.000 articles with its own topics.In the previous process, we have a document topic probability vector, so that we can get the topic with the highest probability.This one topic then substitutes with the URL in session to become a session topic.Session topics can be represented as follows.
Where the session   consist of topic    that belong to session s with the length of L.

D. Association Rule Mining
Session topic from (3) contains a list of topic that accessed together in a session.Therefore it can show the interest degree of a user on some topic [2].To uncover the interesting relationship between the topics we used Association Rule Mining.Association Rule Mining is a fundamental data mining task.Association rule can be used to find all co-occurrence relationships and Web usage patterns [8].We used the best known association rule mining algorithm which is the Apriori algorithm proposed in [10].This relationship can be expressed into association rules.Given  =  1 ,  2 , … ,   be a set of items, where each  is session topic (  ) and i is an item or topics (   ).Let  =  1 ,  2 , … ,   be a set of transactions or a set of session topics where each session topic is a set of topics such that   ⊆ .Support and confidence are used as the metrics for the rule.The main purpose of association rule mining is to discover all association rules in T that have support and confidence greater than or equal to the minimum support and minimum confidence given by user [8].An association rule can be represented as,  → , where  ⊂ ,  ⊂ , and  ∩  = ∅.

E. Recommendation System
In the online phase, recommendation system generated based on two level of the knowledge base, association rules and topic similarity.

1) Recommendation Based on Association Rules: An example of association rules is : Culinary
The rule says that 20% visitors read culinary article and accomodation article in one session, and those who read the culinary article also read accomodation article 80% of the time.The left part of the rule is known as the antecedent, and the right part known as the consequent.These co-occurence relationship used as a recommendation for the web articles.During user surfing sessions, the system will match the sessions with the antecedent, and if such rule is found then the system will recommends the consequent item.
2) Recommendation Based on Topic Similarity: It is possible that during the browsing of a user, no session is match the association rule.Therefore, it needs a knowledge base that assure recommendations.We used document similarity based on document-topic vector generated in (3).The intuition behind LDA is that document is a mixture of multiple topics [12] with different probabilities.Given that probabilites vector, we can measure the similarity of documents by using cosine similarity.

IV. Results
We have collected a month of user request from gudegnet web server log.It was contained 15.795.173requests, and by doing data cleaning, we can reduce it into 212.694requests.Then we perform user identification and sessionization and we got 148.666session with the average length is 1,4 URL per session.From the result, we can see that the bounce rate in gudegnet is very high.We decided to remove the session that contains only have one URL.After this elimination, we got 30.032sessions with 3.1 URL per session.From the content side, we scraped 12.908 articles from gudegnet, with 10.791 in Bahasa Indonesia, and 4.893 in English.On each language, we performed topic modeling so we got 2 topic model, with each of the model contain 10 topics.Then, we make document topic probability for each article based on particular language.The example of topic model in bahasa Indonesia can be seen in Table I.
We combine URL session and topic, to become the session topic.In the session, it is highly possible that a user can access the same topic throughout the navigation.The objectives of this association rule analysis are to seek the different topic that frequently access together.We make a distinct topic selection in every session and eliminate the item set that only has 1 topic.This process resulted in 7.619 session topic.This would become the input for association rule generation with Apriori.
We perform apriori with minimum support 0,01 and minimum confidence 0,6.With these parameters, there are 144 frequent itemset and 11 rule.The sample result of the frequent itemset can be seen in the following.The number means the topic number base on Table 1.
When the user navigate into article with the highest probability of topic is topic 10, the system give recommendation several article on topic 6.We can see the support for this rule is very low in 1% but the confidence is pretty high in 77%.The second level of recommendation is based on the topic similarity between articles.We infer model from Table I into all web articles to create a document topic (2).The example of document topic probability can be seen in Table 2.

Table 1 .
Topic Model