Abstract
Clustering is a very useful technique to categorise Web users with common browsing activities, access patterns and navigational behaviour. Web user clustering is used to build Web visitor profiles that make the core of a personalised information recommender system. These systems are used to comprehend Web users surfing activities by offering tailored content to Web users with similar interests. The principle objective of Web user sessions clustering is to maximise the intra-group while minimising the inter-group similarity. Efficient clustering of Web users’ sessions not only depend on the clustering algorithm’s nature but also depend on how well user concerns are captured and accommodated by the dissimilarity measure that are used. Determining the right dissimilarity measure to capture the access behaviour of the Web user is very significant for substantial clustering. In this paper, an intuitive dissimilarity measure is presented to estimate a Web user’s concern from augmented Web user sessions. The proposed usage dissimilarity measure between two Web user sessions is based on the accessing page relevance, the syntactic structure of page URL and hierarchical structure of the website. This proposed intuitive dissimilarity measure was used with K-Medoids Clustering algorithm for experimentation and results were compared with other independent dissimilarity measures. The worth of the generated clusters were evaluated by two unsupervised cluster validity indexes. The experimental results show that intuitive augmented session dissimilarity measure is more realistic and superior as compared to the other independent dissimilarity measures regarding cluster validity indexes.
Keywords
1. Introduction
Due to exponential growth and continual popularity of the World Wide Web (www), most organisations now put their stipulated information on the Web to provide Web-based services to Web users. At present, masses are navigating Websites at a very large scale to acquire information and knowledge. This user navigation on the Web results in the enormous quantity of information about their surfing activities on the Web hosting servers in the form of Web server access logs [1]. These Web server logs are further analysed to deduce useful information and this analysis is known as Web usage mining. A challenging aspect of Web usage mining is to deduce useful information about Web users’ habits, interests and expectations. The information about the browsing behaviour of Web users may be revealed by applying different Web usage mining approaches on the Web server log repositories [2]. Clustering is one of the effective Web usage mining techniques to group Web users with common browsing activities, access patterns and navigational behaviours. The potential applications of Web user session clustering are in accessing personalised information, improvement in information delivery system, Website modification, business intelligence and Web user characterisation [3].
Clustering techniques are broadly classified into two major classes: one works with feature vector data and is known as object data clustering; the other works with relational data and is known as relational clustering. Relational clustering is preferred over feature vector based clustering for categorisation of Web user sessions because they are difficult to represent by numerical features [4]. But the essential requirement of any relational clustering algorithm is to encode a degree of resemblance between pairs of user sessions in the form of dissimilarity matrix. Determining the right dissimilarity measure to capture the access behaviour of the Web user is very significant for substantial clustering. One of the most challenging issues in clustering Web sessions is how to measure the similarity of two Web user sessions. Clustering results very much depend on how well user concerns are captured and accommodated by the used similarity metric between two Web user sessions [5]. Typically, the high precisions of dissimilarity metric leads to the enhanced quality clusters of Web user sessions and vice versa [6].
Therefore, a good similarity measure should be defined so that it does not ignore the syntactic and hierarchical organisation of page URLs of Web navigations in user sessions. This similarity measure should also consider the Web user’s habits, interests and expectations by considering the relevance of pages in every session because all of the URLs visited in a session are not equally important to the user [7]. The most popular measures used for Web sessions clustering are Euclidean distance, Cosine similarity measure and Jaccard Coefficient [8]. In the past, a variety of similar measures have been proposed to recognise accurate similarity among users based on their access behaviour, but these measures are used independently [9–12].
This paper presents an intuitive augmented session dissimilarity measure to estimate a Web user’s concern from augmented Web user sessions. This similarity measure is based on accessing page relevance, the syntactic and hierarchical structure of a page URL.
The rest of this paper is organised as follows: Section 2 briefly reviews the existing literature on different (dis)similarity measures for web user sessions. In section 3, the methodology adopted for the computation of page relevance based augmented session similarity is described in detail. Section 4 describes the computation of a page relevance based augmented session similarity matrix in brief. Section 5 presents the URL based syntactic similarity computation method in brief. Section 6 presents a description of a hierarchy based syntactic similarity technique. In section 7, an intuitive augmented session similarity metric is proposed with an illustrative example. In section 8, a Web user clustering and various cluster validity indexes were discussed in detail to test the effectiveness of different dissimilarity measures. In section 9, experiments have been set to demonstrate the performance of the intuitive similarity metric with various other individual measures presented and results were discussed in details. Finally, section 10 concluded this work with some suggested future studies.
2. Related work
In the literature, diversity of similarity measures has been discussed for measuring Web user’s session similarity/dissimilarity to categorize the Web users who exhibit the analogous browsing behaviour. Web user sessions are represented by a vector of the dimension of page URLs on any Website. Different values are assigned to these dimensions (page URLs) for different user access behaviour analysis. The extensively used technique is to assign binary values to these dimensions based on their user access (1-for access) or not access (0-for not access) of a Web page (URL) in a particular session [2, 9]. Nasraoui et al. [9], used this method of Webpage access representation in any Web user session vector. They use a cosine similarity measure to compute the similarity between any two user sessions using this binary representation for clustering of user sessions. Yan et al. [13] and Forsati et al. [14], proposed access duration and access frequency of the page based weights to page URLs, in particular, sessions as an alternative of binary weights. Chan [10] and Xiao et al. [11] the concept of implicit measure of user interest of a page was introduced and further extended by Liu and Kešelj [12] and proposed page stay time (duration) and page access frequency to measure the user concern for a Web page. Banerjee and Ghosh [15], used relative time spent on longest common subsequence and abstract similarity graph. Wang and Zaïane [16], proposed the concept of sequence alignment using the hierarchical structure of URLs on the Website. The precise page viewing time of visiting pages and URL of the pages are presented in Liu and Lu [17]. Bose et al. [18], introduced a Website concept hierarchy based similarity scoring system that further integrated with other similarity measures like browsing order and time spent on a page.
3. Methodology
This section presents a detailed description of the adopted methodology under following subsections.
3.1. Web server logs pre-processing
The Web server access logs keep a record of all files/pages explicitly or implicitly accessed by the Web users. Each log entry consists of different fields like remote host address, remote log name, username, timestamp and time zone of the request, request method, path on the server, protocol version, service status code, the size of the returned data and referrer user agent [19].
First, the Weblog entries that are not germane to our purpose were removed. These are mostly implicit requests made for embedding objects within Web pages, requests made by automated software agents [20], unsuccessful requests of users and requests with access methods other than GET.
Second, the Web server log entries are grouped into user sessions, where session refers to the unit of interaction between a Web user and a Web server. This work considered a broadly accepted and practically implemented timeout based session identification method [21]; other session identification techniques are also available in the literature [22, 23]. A session is created when a new IP address is found in the Weblog entries, and subsequently, a request from the same IP address is added to the session as long as the lapsed time between two consecutive requests does not exceed a predefined threshold value, set for 30 min in our work. Otherwise, the current session closes and new session starts. A Web user’s historical access pattern may have more than one session because he or she may visit a Website from time to time and spend an arbitrary amount of time between consecutive visits [24].
3.2. Vector space representation of Web user sessions
Suppose, for a given website, there is m usage sessions extracted from the Web server log
3.3. Computation of a page relevance in any Web user session
Web users’ interests for any page are computed by implicit measures [10, 11]. These implicit measures are page stay time (duration) and page access frequency of a Web page in a Web user session [12]. The following measures are computed to find the relevance of a Web page in any user session to measure the Web user concern for a Web page.
3.3.1. Duration of page
Duration of page is defined as the time spent on a page by a Web user and is the difference between the exact time of the request for page
where 0≤
3.3.2. Frequency of page
Frequency of a page is the number of times the Web page
where 0≤
3.3.3. Relevance of the page
The relevance of the page in any user session is computed by giving equal importance to the duration of page and frequency of page because this harmonic mean will moderate the impact of large and small outliers [6]. Eq. (5) is used to measure the relevance of a Web page (
where 0 ≤
3.4. Augmented Web user sessions
Now, by applying Eqs. (3) to (5) the page relevance matrix (
The augmented Web session is represented as
4. Page relevance based augmented session similarity
Here, relevance of pages accessed in user sessions is incorporated in simple cosine similarity measure in Eq. (7). Augmented session similarity between any two augmented Web user sessions
This augmented session similarity measure may be more realistic and may represents session similarities based on the Web user’s habits, interests and expectations as compared to a simple binary session (dis)similarity measure. But a key constraint of this measure is also the same as of a simple binary session (dis)similarity measure [9], that it completely abandons the hierarchical grouping of Web URLs which are placed in the same directory if Web pages are related.
5. A URL syntactic similarity between
and
page URL
In [9], the authors also defined an alternative URL based syntactic similarity measure to compute the syntactic similarity between any pair of Web page URLs
Where
By applying URLs syntactic similarity of Eq. (8), the augmented URL syntactic similarity measure between two augmented Web user sessions
However, this similarity measure assumes a uniform URL based syntactic similarity of one for any node, its parent and all sibling nodes of any parent. This assumption is not very intuitive because in a hierarchy based syntactic model of a Website tree, lower level nodes represent more conceptually related information than the higher level nodes. Therefore, their syntactic similarity can provide arbitrarily low values between identical sessions.
6. A hierarchical syntactic similarity between
and
page URL
Consider a hypothetical hierarchical organisation of Web page URLs of a Website (Figure 1). In a hierarchy based syntactic model of the site, Web page URLs are placed at different levels of the tree and represented by nodes. The root of the tree is the highest level URL and represents the home page of a Website. Here, it is assumed that any node, its parent, and all sibling node pairs of any parent at lower levels in URL hierarchy, should be more similar than higher level pairs. The correlated subject URLs are put together (as siblings) in the same subdirectory.

Hierarchical organisation of Web page URLs.
For the root node page URL, level one is assumed when the level of lowest common ancestor (
Where
Now the session level similarities are computed by incorporating hierarchical syntactic similarity from Eq. (10) with cosine measure of the page relevance based augmented session similarity in Eq. (7). Eq. (11) is used to define a hierarchy based augmented URL syntactic similarity
7. Intuitive augmented session similarity
In the previous section, several existing measures have been described, and their limitations have been discussed. In order to overcome these limitations, an intuitive augmented Web user session similarity measure (IASS) has been proposed in this article. This similarity measure is based on page relevance; URL and hierarchy based syntactic similarity of two Web user sessions.
Illustrative Example: Consider any two random hypothetical augmented sessions
If any pair of Web pages has a small value of hierarchical syntactic similarity and a URL based syntactic similarity, the page relevance based augmented session similarity will produce good results. For large values of augmented URL and hierarchy based URL syntactic similarity they will produce better results. Intuitive augmented session similarity utilises the properties of all three measures and considers the maximum optimistic aggregation of these measures to give superior similarities between Web user sessions. Intuitive augmented session similarity is computed using Eq. (12).
As a requirement of relational clustering, this intuitive augmented session similarity is converted to the dissimilarity/distance measure. This distance measure satisfies the necessary conditions of a metric [27]. The intuitive augmented session dissimilarity is computed using Eq. (13).
Where 0 <
The distance between any two sessions must be non-negative.
The distance between two sessions must be zero if and only if the two sessions are identical.
The distance must be symmetric, that is, the distance from
The pseudo code for proposed intuitive augmented session dissimilarity metric is presented as Algorithm 1. This algorithm summarised the above-described procedure and is used to compute essential dissimilarity matrix for relational clustering of Web user sessions.
8. Web user session clustering and validity measures
To evaluate the performance of a proposed intuitive augmented session dissimilarity measure, K-Medoids Clustering [28] was preferred over K-means [29]. This is because it chooses one of the real sessions from the data set as a centre of the cluster, which is used to represent the cluster, while in K-means [29] this centre of a cluster (centroid) is computed as the mean of sessions belonging to that cluster. This fundamental difference makes the K-Medoids approach more suitable for user session (dis)similarity metrics (relational data) [30]. Given a set of user sessions
Let
Where,
To assess the quality of generated clusters we used Dunn’s validity (DV) Index [31] and Davies-Bouldin (DB) Index [32]. These two unsupervised validity measures are based on compactness and separation and are measured by intra-cluster and inter-cluster distances.
The Dunn’s Index seeks to find out most compact and well-separated clusters. Therefore, the number of clusters for which the value of Dunn’s Index maximised is considered as an optimal value. The DV Index is given by Eq. (16).
Where,
The DB Index measures the average of similarity between each cluster and its most similar one. The number of clusters for which the value of DB Index is minimised is considered as an optimal value. The DB Index is given by Eq. (17).
Where
9. Experimental results and discussion
To evaluate the performance of the proposed intuitive augmented session dissimilarity measure, a number of experiments have been performed. All experiments were performed with an Intel Core 1 i3 (CPU M370 2.40 GHz) with 4.00 GB RAM. In the experiments, the Web access logs of a Web server of an academic institution 2 were used because the concept hierarchy of this Website is known to us. The proposed measure was implemented and tested using MATLAB 3 [33]. For our experiments, K-Medoids Clustering code available at MATLAB Central file exchange [34] has been modified and used, with different dissimilarity measures and computed the value of the Dunn’s Index and DB Index [35] with varying number of user sessions clusters. Table 1 gives a brief summary original server log file.
Summary original server log file
First, the necessary preprocessing step was applied on these Weblogs and generated 4906 sessions using a 30-min threshold time. After that 184 Web robot sessions are filtered out from the generated user sessions because they are generated by automated software agents and their access behaviour is monotonous. Subsequently, 1920 minuscule sessions of length 1, 2 or 3 were also removed from the total generated sessions as they did not contribute any significant information for user session clustering.
Finally, after performing the session filtering, 2802 Web user sessions are left for experimentation. These 2802 Web user sessions accessed more than 385 unique pages in total. Further, by removing very less frequent and very short duration visited pages the number of unique pages is reduced to 167. Table 2 presents a summary of the cleaned and pre-processed server log file.
Summary of cleaned and pre-processed server log file
Now, by applying Eq. (7) an augmented web user session dissimilarity metric of size 2802 × 2802 is computed. Then a 167 × 167 URL similarity metric is computed for all referred unique pages (URLs) by using Eq. (8) and by using this a URL based syntactic dissimilarity of 2802 × 2802 is computed by Eq. (9).
Again, the same procedure is adopted to compute augmented hierarchy based URL syntactic similarity metric
Summary of Dunn’s validity (DV) Index and Davies-Bouldin (DB) Index for different dissimilarity measures and varying numbers of clusters by K-Medoids clustering
After that, an intuitive augmented dissimilarity metric is computed by using Eq. (12) and Eq. (13). This dissimilarity metric takes the maximum value of dissimilarities from the aforementioned dissimilarity matrices.
After computation of different dissimilarity metrics, the K-Medoids clustering algorithm was used with the different number of clusters (i.e.
The validity of generating clusters is evaluated by computing the DV Index and DB Index, respectively. The results are summarised in Table 3.
The main argument of the proposed work is that only binary consideration (accessed or not accessed) of accessing pages in any Web user session is not sufficient to categorise user browsing behaviour. However, the web user’s habits, interests and expectations should also be considered by measuring the relevance of pages in every session because all of the URLs visited in a session are not equally important to the user. At the same time, one cannot ignore the syntactic structure of the accessing page URL and hierarchical position of this URL in Website organisation.
By considering the above-stated facts, an intuitive dissimilarity measure was proposed to capture the resemblance between two user sessions. Finally, to evaluate the effect of this measure, the performance of proposed measure was compared with other independent measures using K-Medoids clustering algorithm with varying number of clusters (i.e.
The experiment results are shown in Figures 2 and 3, and it has been observed that intuitive dissimilarity metric performed better regarding the DV Index and the DB Index.

Dunn’s validity (DV) Index vs. number of clusters for different dissimilarity measures.

Davies-Bouldin (DB) Index vs. number of clusters for different dissimilarity measures.
The DV and DB validity index suggest five numbers of optimal clusters in considered Weblog data. The experimental results suggest that the maximum aggregation of page relevance, URL syntactic and URL hierarchy based augmented session dissimilarity in proposed intuitive dissimilarity metric is proved better most of the time and represent session dissimilarities in the more significant way.
10. Conclusion and future work
In this paper, the concept of augmented sessions was used and an intuitive augmented user sessions dissimilarity metric is proposed for web user sessions. The proposed metric was based on URL syntactic dissimilarity, hierarchical URL syntactic dissimilarity and page relevance based augmented session dissimilarity. This metric take the advantage of all the aforementioned (dis)similarity measures. The dissimilarity metrics generated by different measures were provided as input to K-Medoids clustering to generate a different number of clusters. DV Index and DB Index were used to assess the quality of generated clusters. Experiments have been performed with varying number clusters to get optimised and stable results. Experimental results show (Figures 2 and 3) that intuitive augmented session dissimilarity measure outperformed the individual page relevance based augmented session, URL based syntactic and augmented hierarchy based URL syntactic dissimilarity measures on both DV and DB index evaluation parameters. It has been observed that optimised and stable results were found for five numbers of clusters. However, in this experiment a small size server log was considered to avoid pre-processing overhead. Therefore in the future the same experiment may be extended for larger web log data. The same hypothesis may be tested with other clustering algorithms with a different set of cluster validation measures to generalise the results.
Footnotes
Acknowledgements
The authors are very thankful to the editors and anonymous referees whose valuable suggestions and comments helped to improve the paper.
Funding
This research received no specific grant from any funding agency in the public, commercial or not-for-profit sectors.
