Docsity

Clickstream Clustering using Weighted Longest Common Subsequence | N 1, Papers of Health sciences

Toggle sidebar
bg1
Clickstream Clustering using Weighted Longest Common
Subsequences
Arindam Banerjee and Joydeep Ghosh∗
{abanerje,ghosh}@ece.utexas.edu
Dept. of Electrical and Computer Engineering
University of Texas at Austin
Austin, TX 78712
Abstract
Categorizing visitors based on their interactions with a website is a key problem in web usage mining. The
clickstreams generated by various users often follow distinct patterns, the knowledge of which may help in providing
customized content. In this paper, we propose a novel and effective algorithm for clustering webusers based on a
function of the longest common subsequence of their clickstreams that takes into account both the trajectory taken
through a website and the time spent at each page. Results are presented on weblogs of www.sulekha.com to illustrate
the techniques.
keywords : web usage mining, clickstream, subsequence, clustering.
1 Introduction
With the rapid increase in web-traffic and e-commerce, understanding user behavior based on their interaction with
a website is becoming more and more important for website owners. Identifying the nature of each user visiting a
website may enable that site to provide customized content for the users, thereby making it more sticky and enhancing
user experience. The business implications of such an ability are huge, specially for portals, personalized content
providers and e-tailers.
The sequence of pages visited by a user within a particular website is his “clickstream” in that site for one session.
The purpose of clustering users based on their clickstreams in a particular website is to find groups of users with
similar interests and motivations for visiting that website. If the site is well designed there will be strong correlation
between the similarity among user clickstreams and the similarity among the users’ interests or intentions. Therefore,
clustering of the former could be used to predict groupings for the latter.
A lot of research has been done in the area of Web Usage Mining [1] which directly or indirectly addresses the
issues involved in the extraction of web navigational patterns [2], ordering relationships [3], prediction of web surfing
behavior [4], and clustering of web usage sessions [5] based on web logs, possibly supplemented by web content or
structure information. A fundamental difficulty in all these problems is that the raw data is in the form of sequences,
and not vectors. As a result, well developed mining techniques for vector type data cannot be applied directly. The
specific problem of web usage clustering has been studied over the past few years. In [5], the authors looked at
clustering web usage sessions using a generalization-based approach and making use of the hierarchical clustering
algorithm called BIRCH. In [6], the authors introduced the idea of a path feature space and path angles, and finally
clustered the paths using the k-means algorithm. However, a definitive solution is yet to emerge.
Categorizing visitors from their clickstream is a difficult problem since typically the number of possible sequences
of page-visits is huge. Moreover the time spent at each page may differ significantly from user to user. The time spent
by a user in a particular page is a clear indication of the user’s interest in the page1, and thus should not be ignored.
Using the webserver logs, we have developed a formal definition of a path corresponding to a session in a website
∗contact author; phone 512 471 8980; fax 471 5907
1however one needs to set a heuristic upper bound on the time spent on any page by any user to take care of outliers, distracted users, etc.
pf3
pf4
pf5
pf8

Partial preview of the text

Download Clickstream Clustering using Weighted Longest Common Subsequence | N 1 and more Papers Health sciences in PDF only on Docsity!

Clickstream Clustering using Weighted Longest Common

Subsequences

Arindam Banerjee and Joydeep Ghosh∗

{abanerje,ghosh}@ece.utexas.edu

Dept. of Electrical and Computer Engineering

University of Texas at Austin

Austin, TX 78712

Abstract Categorizing visitors based on their interactions with a website is a key problem in web usage mining. The clickstreams generated by various users often follow distinct patterns, the knowledge of which may help in providing customized content. In this paper, we propose a novel and effective algorithm for clustering webusers based on a function of the longest common subsequence of their clickstreams that takes into account both the trajectory taken through a website and the time spent at each page. Results are presented on weblogs of www.sulekha.com to illustrate the techniques. keywords : web usage mining, clickstream, subsequence, clustering.

1 Introduction

With the rapid increase in web-traffic and e-commerce, understanding user behavior based on their interaction with a website is becoming more and more important for website owners. Identifying the nature of each user visiting a website may enable that site to provide customized content for the users, thereby making it more sticky and enhancing user experience. The business implications of such an ability are huge, specially for portals, personalized content providers and e-tailers. The sequence of pages visited by a user within a particular website is his “ clickstream ” in that site for one session. The purpose of clustering users based on their clickstreams in a particular website is to find groups of users with similar interests and motivations for visiting that website. If the site is well designed there will be strong correlation between the similarity among user clickstreams and the similarity among the users’ interests or intentions. Therefore, clustering of the former could be used to predict groupings for the latter. A lot of research has been done in the area of Web Usage Mining [1] which directly or indirectly addresses the issues involved in the extraction of web navigational patterns [2], ordering relationships [3], prediction of web surfing behavior [4], and clustering of web usage sessions [5] based on web logs, possibly supplemented by web content or structure information. A fundamental difficulty in all these problems is that the raw data is in the form of sequences, and not vectors. As a result, well developed mining techniques for vector type data cannot be applied directly. The specific problem of web usage clustering has been studied over the past few years. In [5], the authors looked at clustering web usage sessions using a generalization-based approach and making use of the hierarchical clustering algorithm called BIRCH. In [6], the authors introduced the idea of a path feature space and path angles, and finally clustered the paths using the k-means algorithm. However, a definitive solution is yet to emerge. Categorizing visitors from their clickstream is a difficult problem since typically the number of possible sequences of page-visits is huge. Moreover the time spent at each page may differ significantly from user to user. The time spent by a user in a particular page is a clear indication of the user’s interest in the page^1 , and thus should not be ignored. Using the webserver logs, we have developed a formal definition of a path corresponding to a session in a website ∗contact author; phone 512 471 8980; fax 471 5907 (^1) however one needs to set a heuristic upper bound on the time spent on any page by any user to take care of outliers, distracted users, etc.

and a way to compute a similarity measure between any two paths for a given resolution , taking into account both the trajectory taken and the time spent at each page. For getting the user paths from webserver logs, we need to first extract the user sessions from the weblog files. Extracting user sessions from weblogs, specially in the absence of cookie information, is a difficult task and we will not address it here. We shall assume that the sessions have already been extracted either using cookies or by some reasonable heuristics [7]. Then we define a path generated in a session and propose a method for finding the similarity between all pairs of paths that have been obtained from the extracted sessions. This method first determines the intersection of any two paths under consideration as defined by the longest common subsequence(LCS) between the two sequences of pages visited by each user. Then, a similarity value is computed over this LCS as a function of the closeness in the times spent on the corresponding pages weighted by a certain importance factor. Using these similarity values, a graph is constructed whose nodes are the paths. An edge connecting two nodes has a weight equal to the similarity value between the corresponding paths. Clustering of the sessions is then performed in this similarity space using efficient graph-based techniques. For large websites, if paths are considered at a webpage level of resolution, many of the similarity values turn out to be zero since very few paths have actual page overlaps. This may not reflect user behavior properly. Therefore we introduce the idea of concept-based paths so that paths through conceptually similar pages have a non-null intersection even without any direct webpage overlap. This procedure is effective in yielding meaningful clusters of user paths. Also, this reduces the computations by a significant amount. The paper is organized as follows. In section 2, we define a path through a website formally and briefly discuss the algorithm for finding the intersection between two such paths. We propose a path similarity measure between two paths making use of their intersection and show some properties of the measure in section 3. The formation of the similarity graph from these pairwise similarity values and methods for obtaining the path clusters from this graph are discussed in section 4. In section 5 we extend the idea of a path to a concept based path and explain the reasons for doing so. In section 6, we discuss sample results. We study the flexibility and other issues of the algorithm in section 7. We draw some conclusions in section 8.

2 Path Intersection

A session in which a user visits n pages can be represented as a n-length sequence of ordered pairs given by π = [(α 1 , τ 1 α ) (α 2 , τ 2 α ) · · · (αn, τ (^) nα )], where ~α = 〈α 1 , α 2 , · · · , αn〉 is the sequence of webpages visited, αj being the jth page visited in the session, and ~τ α^ = 〈τ 1 α , τ 2 α , · · · , τ (^) nα 〉 being the corresponding sequence of times spent on a page, τ (^) jα being the time spent on αj. We shall call the sequence α~ as the path corresponding to the session under consideration. Next, we shall outline a dynamic programming algorithm for finding the intersection between two such paths. Formally, given a sequence ~α = 〈α 1 , α 2 , · · · , αn〉, another sequence ~γ = 〈γ 1 , γ 2 , · · · , γl〉 is a subsequence of α~ if there exists a strictly increasing sequence 〈j 1 , j 2 , · · · , jl〉 of indices of ~α such that for all i = 1, 2 , · · · , l, we have αji = γi. Given two sequences ~α, β~, we say that ~γ is a common subsequence of ~α and ~β if ~γ is a subsequence of both ~α and β~. We are interested in finding the maximum-length or longest common subsequence(LCS) given two paths or sequences of page-visits ~α = 〈α 1 , α 2 , · · · , αn〉 , ~β = 〈β 1 , β 2 , · · · , βm〉, The LCS has a well-studied optimal sub-structure property as given by the following :

Theorem 1 Let ~α = 〈α 1 , α 2 , · · · , αn〉 and β~ = 〈β 1 , β 2 , · · · , βm〉 be sequences, and let ~γ = 〈γ 1 , γ 2 , · · · , γl〉 be any LCS of ~α and β~.

1. If αn = βm , then γl = αn = βm and ~γl− 1 is a LCS of α~n− 1 and β~m− 1_.

  1. If_ αn 6 = βm , then γl 6 = αn implies ~γ is a LCS of ~αn− 1 and β~_.
  2. If_ αn 6 = βm , then γl 6 = βm implies ~γ is a LCS of α~ and β~m− 1_._

where α~n− 1 = 〈α 1 , α 2 , · · · , αn− 1 〉 , β~m− 1 = 〈β 1 , β 2 , · · · , βm− 1 〉 and ~γl− 1 = 〈γ 1 , γ 2 , · · · , γl− 1 〉

The proof of this theorem can be found in [8]. Efficient recursive algorithms to compute the LCS exist using this property of the LCS [9]. We shall not go into the details of the algorithms since a lot of literature already exists on the topic [9, 10, 11]. We have implemented the O(mn) algorithm presented by Wagner and Fischer [8, 12] with an added module that outputs the subsequence of indices of the two sequences that match in forming the longest

The proposed similarity measure has the following properties :

  1. In case of no overlap between the paths, S~α~β = 0 : If there is no overlap, L = 0. Hence S′^ = 0 as the summation was over i = 1,... , L. For the same reason, T (^) LCSα = T (^) LCSβ = 0 and hence S′′^ = 0. So, S~αβ~ = S′^ × S′′^ = 0.
  2. In case of identical paths, S~α~β = 1 : In this case L = n = m and τ (^) lαα (^) (i) = τ (^) lββ (^) (i), i = 1,... , L. As a result, si = 1, ∀i and hence S′^ = 1. Again, as L = n = m, T (^) LCSα = T (^) LCSβ = T α^ = T β^ and hence S′′^ = 1. Therefore, S~αβ~ = 1.
  3. In general, 0 ≤ Sα~β~ ≤ 1 : This property follows from the fact that since S ′^ is an average over terms each of which lies between 0 and 1, 0 ≤ S′^ ≤ 1. Again, since S′′^ is the arithmetic mean of two fractions lying between 0 and 1, 0 ≤ S′′^ ≤ 1. Hence their product lies between 0 and 1.
  4. The similarity measure is commutative as Sαβ = Sβα.

4 The Similarity Graph and Clustering

In the previous section, a technique to find the similarity between any pair of paths was outlined. Thus, if there were P paths π 1 , π 2 ,... , πP under consideration,

(P

2

similarity values are obtained. These are used to construct a weighted similarity graph G 0 = (V 0 , E 0 ), where V 0 = {π 1 , π 2 ,... , πP } and the edge eij between the nodes πi and πj exists ∀i, j, i 6 = j, and has a weight equal to the path similarity value between the paths πi and πj as computed from section 3. We shall represent the edge-weight of the edge eij by |eij |. Note that |eij | = |eji| from property 4 of the similarity measure. Also, from property 3, we get that 0 ≤ |eij | ≤ 1 , ∀i, j, i 6 = j. From G 0 , another undirected graph Gθ = (Vθ , Eθ) is constructed as follows :

  1. Initialize : Vθ = Eθ = φ, the null set.
  2. Choose an edge threshold θ such that 0 ≤ θ ≤ 1.
  3. for i = 1 to (n − 1) for j = (i + 1) to n if eij ≥ θ Vθ ← Vθ ∪ {πi, πj } Eθ ← Eθ ∪ eij end end end

Note that |Vθ| ≤ |V 0 | and |Eθ | ≤ |E 0 | and the equality occurs when θ = 0. Gθ maybe a disconnected graph but will not have isolated vertices. This property is proved in Appendix A. The idea behind the construction of Gθ is based on a number of observations which we shall discuss next. A lot of webusers show similar behavior while surfing and can be automatically categorized into meaningful groups. However, there are quite a few whose behavior does not follow any general group characteristics. As the result, the nodes in the similarity graph representing the paths taken by these users are only weakly connected to the other nodes of the graph. Clustering based on G 0 is undesirable since these outlier users will be forced into the nearest cluster. The thresholding approach described above takes out the outliers from G 0 before clustering. It is to be noted that for a path to be taken out from the graph, it has to be a unique outlier – if there is at least another path which has strong similarity to this path, both of them stay in Gθ. One can think of variations and generalizations on these lines but we shall not go into that in this paper. The problem of clustering is formulated as the partitioning of the graph Gθ with min-cut and balancing constraints. A set of edges whose removal partitions the graph into k pair-wise disjoint subgraphs Gl = (Vl, El) is called an edge separator ∆E. The objective is to find such a separator with a minimum sum of edge weights as given by

min ∆E

eij ∈∆E

|eij | where ∆E =

Eθ −

⋃^ k

l=

El

and

⋃^ k

l=

Vl = Vθ (5)

The above mentioned min-cut objective is to be achieved under a balancing constraint given by k × max l

|Vl| ≤ t. For

graphs with weighted vertices, the |Vl| term is replaced by the sum of the vertex weights. The imbalance threshold t ≥ |Vθ | – the higher it is, the more is the imbalance allowed and vice versa. Partitioning of Gθ into k parts gives k sets of relatively closely connected nodes. Since the nodes represent the paths, we end up in getting k clusters of the paths from clustering and a set V ′^ = (V 0 − Vθ ) of unique outliers from thresholding. An efficient and fast graph partitioning algorithm called Metis [13] is used for partitioning Gθ.

5 Concept-based Clustering

If paths are considered at the webpage level of resolution, paths tend to have very little similarity with one another. This is because at such a high resolution, there are very few exact webpage matches between the paths. This results in a lot of small or even zero length LCSs which in turn makes the number of paths to be clustered (|Vθ |) pretty small even for small values of θ. This also makes the number of outliers (|V 0 − Vθ |) large and all this is perhaps not very desirable. At this point we observe that though there not many exact webpage matches, a lot of webpages in the site are semantically equivalent. So, the webpages can be first grouped into categories based on suitable analytics and/or metadata information. We shall call each of these categories a concept and then new paths can be formed from the concept-category of the pages present in the original path. Even though there may not be exact webpage matches between two paths, if the paths are through similar concepts, e.g., sports, politics etc., we shall get a non-zero similarity value between the paths. Since most websites have their contents already categorized based on subject or topic into an ontology, this structure can be readily used to form the concepts. We have used this method successfully on the weblogs from www.sulekha.com, a highly trafficked community site and from www.ece.utexas.edu, the website of the department of ECE at UT, Austin. We shall briefly discuss the concept-categories for sulekha , followed by a few examples of conversion from webpage based paths to concept-based paths. Being a very structured website, we identified the concept-categories to be the first level branchings from the root page of sulekha.com, the root page in itself being a category. We identified the following categories – home, which stands for www.sulekha.com/index.html; articles, authors, biztech, books, coffeehouse, contests, cooltools, creative, fun, games, movies, personal, philosophy, politics, sports, wo-men, each of which corresponds to a first level branching from home^3 and misc, which stands for all the webpages in the site that do not fall in any of the previously mentioned categories. When we convert the raw paths to concept-based paths, the average size of the path reduces and we get paths which can be easily understood. A few examples of this conversion are shown in Table 5.

Original path Concept-based path ( /authors/ramesh mahadevan.html,3 ) → ( /authors,3 ) → ( /articles/rm phattas.html,75 ) → ( /articles,114 ) → ( /articles/rm desidads.html,39 ) ( /,85 ) → ( /,85 ) → ( /authors/arun sampath.html,109 ) → ( /authors,109 ) → ( /philosophy/messages/1951.html,102 ) → ( /philosophy,148 ) → ( /philosophy/messages/1953.html,46 ) → ( /,3 ) → ( /,3 ) → ( /philosophy/messages/1954.html,69 ) ( /philosophy,69 ) ( /,27 ) → ( /,27 ) → ( /articles/abbas hindi.html,108 ) → ( /articles,108 ) → ( /wo-men/messages/1520.html,23 ) → ( /wo-men,101 ) ( /wo-men/messages/1522.html,19 ) → ( /wo-men/messages/1521.html,20 ) → ( /wo-men/messages/1524.html,39 ) ( /,249 ) → ( /,249 ) → ( /fun/messages/2586.html,73 ) → ( /fun,112 ) → ( /fun/messages/2588.html,11 ) → ( /fun/messages/2587.html,28 ) → ( /movies/messages/1470.html,31 ) → ( /movies,202 ) → ( /movies/messages/1471.html,171 ) → ( /books/messages/1562.html,194 ) → ( /books,194 ) → ( /articles/dmobilus vaccine.html,74 ) → ( /articles,178 ) ( /articles/rananath heavens.html,104 )

Original paths converted to Concept-based paths.

0.5^0 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1

1

2

2.5 x 10 4

Threshold θ

Number of Vertices

Graph Size Isolated Points

Variation of |Vθ | and |V 0 − Vθ | with change in θ. (^3) for example, the pages www.sulekha.com/books/foo.html, www.sulekha.com/books/foo/bar.html fall into the category books

lot of paths which were in different clusters came into the same cluster which was not always desirable. For example, the boxed paths in cluster 2 and cluster 5 in the above examples had a similarity of 1 and appeared in the same cluster. One can see that the behavior of these two users were clearly different as the former only glanced through the articles whereas the later actually read them. This extra information comes from the time component and turns out to be very important for a meaningful analysis of weblogs.

7 A Few Comments

Let us take a closer look at the techniques we have proposed in terms of the scalability and some of the design parameters involved.

1 Scalability : The path-similarity algorithm essentially computes the similarity between each pair of a total of P paths. The average-case complexity is O(P 2 L¯), where P is the number of paths under consideration, and L^ ¯ = E(Y Z), where Y = max(X 1 , X 2 ), Z = min(X 1 , X 2 ), and X 1 , X 2 are random variables for the length of a pair of paths taken jointly. This is better than the substring based approach [7] for which L¯ = E(Y Z^2 ). In comparison to the raw path with an average length of around 12-15 pages, the concept-based approach, in which group of pages map to a concept or metapage , reduces the average length of a path significantly, resulting in a significant reduction in complexity.

1 Choice of θ : The choice of θ determines the nature of Gθ and hence the nature of the clusters. For example, for θ = 1, Gθ has nodes only corresponding to pairs of paths that are exactly equal and everything else is treated as an outlier; for θ = 0, Gθ = G 0 and the algorithm ends up pushing real outliers into nearby clusters. If one is interested in very pure clusters^4 only, one shall keep the value of θ high where high will depend on the distribution of edge weights in G 0. On the other hand, if one is interested in categorizing most of the paths in some group or the other, a low value of θ is desirable, once again depending on the distribution of edge weights in G 0.

1 Defining the Concepts : We have defined the concepts as the branchings from the homepage of the website. This is the most simple and naive definition one can think of. However, there are ways of defining a concept in a more involved manner. One can cluster the documents in the website based on their content and define each cluster to be a concept. One can also take into consideration the ontology of the pages in the website and think of a multi-resolution concept. This is one aspect that needs further investigation.

8 Concluding Remarks

Current approaches to path clustering using correlations/associations as well as Markov-like approaches fail to use time information, and do not scale well with longer paths. A novel and noteworthy approach to this problem is taken by the Web Utilization Miner (WUM) system [2], in which individual paths are combined into an aggregated tree, and queries corresponding to desired path patterns are mapped onto the intermediate nodes of this tree structure. Again time information is not used. In the paper, by defining a suitable similarity measure between any pair of paths, we map the paths into a similarity space. This technique enables one to naturally incorporate both path and time information. The idea of threshold- ing the similarity graph is particularly useful for data-mining applications since it is a good way of reducing the size of the data to be handled in the clustering stage, and being more robust against outliers. A fast, scalable and ef- ficient graph-partitioning algorithm has been used to do the clustering. It avoids curse-of-dimensionality problems encountered in traditional clustering methods (K-means etc.) applied to high dimensional spaces. The superiority of graph-partitioning methods for clustering has also been demonstrated in other web analytics domains such as cluster- ing of web documents [14]. Another contribution of this paper is the use of metadata such as pre-existing category labels. This captures the notion of content at a more abstract level. It is possible that extracting textual and meta-tag information from the contents of the pages being viewed can further enhance the quality of user clustering, provided the additional information complexity can be managed properly. (^4) purity may be defined by the completeness of the subgraph induced by the nodes in the cluster

Acknowledgements

This research was supported in part by the NSF under Grant ECS-9000353, and by a gift from Intel. We want to express our gratitude to Satya Prabhakar and Sangeeta Kshetry for providing the sulekha weblog data. All processing was done in a user-anonymous fashion to preserve the privacy of the visitors to sulekha.com.

A Property of Gθ

Property : There are no isolated nodes in the graph Gθ. Proof : If possible let πi be an isolated point in Gθ. Since πi ∈ Vθ , we must have some πj ∈ V 0 , j 6 = i such that |eij | ≥ θ. Again, since πi is isolated, ∀πj ∈ V 0 , j 6 = i, we must have |eij | < θ. We note that both the conditions cannot hold good at the same time. Hence, there cannot be any isolated points in Gθ.

References

[1] R. Cooley. Web Usage Mining: Discovery and Applications of Interesting Patterns from Web data. PhD thesis, Dept. of Computer Science, University of Minnesota, May 2000.

[2] M. Spiliopoulou and L. C. Faulstich. WUM: A tool for web utilization analysis. In Extended version of Proc. EDBT Workshop WebDB’98 , pages 184–203. Springer Verlag, 1999.

[3] H. Mannila and C. Meek. Global partial orders from sequential data. In Proc. 6th Intl. Conf. on Knowledge Discovery and Data Mining (KDD2000) , pages 161–168, Aug 2000.

[4] J. Pitkow and P. Pirolli. Mining longest repeating subsequences to predict world wide web surfing. In Proc 2nd USENIX Symposium on Internet Technologies & Systems (USITS’99) , Oct 1999.

[5] Y. Fu, K. Sandhu, and M. Shih. A generalization-based approach to clustering of web usage sessions. In M. Spiliopoulou B. Masand, editor, Web Usage Analysis and User Profiling , pages 21–38. Springer, 2000.

[6] C. Shahabi, A. M. Zarski, and V. Shah J. Adibi. Knowledge discovery from users web-page navigation. In Proc. 7th Intl Conf on Research Issues in Data Engg , pages 20–29, 1997.

[7] A. Banerjee and J. Ghosh. Concept-based clustering of clickstream data. In Proc. 3rd Intl. Conf. on Information Technology , pages 145–150, Dec 2000.

[8] T. H. Cormen, C. E. Leiserson, and R. L. Rivest. Introduction to Algorithms. MIT Press, 1990.

[9] Vladimir Danˇc´ık. Expected Length of Longest Common Subsequences. PhD thesis, University of Warwick, 1994.

[10] A. V. Aho, D. S. Hirschberg, and J. D. Ullman. Bounds on the complexity of the longest common subsequence problem. J. Assoc. Comput. Mach. , 23:1-12, 1976.

[11] D. S. Hirschberg. Algorithms for the longest common subsequence problem. J. ACM , 24:664–675, 1977.

[12] R. A. Wagner and M. J. Fischer. The string-to-string correction problem. J. Assoc. Comput. Mach. , 21:168-173,

[13] G. Karypis and V. Kumar. A fast and high quality multilevel scheme for partitioning irregular graphs. SIAM Journal on Scientific Computing , 20(1):359–392, 1998.

[14] A. Strehl, J. Ghosh, and R. Mooney. Impact of similarity measures on web-page clustering. In Proc. 7th Natl Conf on Artificial Intelligence : Workshop of Artificial Intelligence for Web Search (AAAI 2000) , pages 58–64. AAAI, July 2000.