clusterClickstreams {clickstream} | R Documentation |
Performs K-Means Clustering on a List of Clickstreams
Description
Performs k-means clustering on a list of clickstreams. For each clickstream a transition matrix of a given order is computed. These transition matrices are used as input for performing k-means clustering.
Usage
clusterClickstreams(clickstreamList, order = 0, centers, ...)
Arguments
clickstreamList |
A list of clickstreams for which the cluster analysis is performed. |
order |
The order of the transition matrices used as input for clustering (default is 0; 0 and 1 are possible). |
centers |
The number of clusters. |
... |
Additional parameters for k-means clustering (see
|
Value
This method returns a ClickstreamClusters
object (S3-class).
It is a list with the following components:
clusters |
The resulting list of
|
centers |
A matrix of cluster centres. |
states |
Vector of states |
totss |
The total sum of squares. |
withinss |
Vector of within-cluster sum of squares, one component per cluster. |
tot.withinss |
Total within-cluster sum of
squares, i.e., |
betweenss |
The
between-cluster sum of squares, i.e., |
Author(s)
Michael Scholz michael.scholz@th-deg.de
See Also
print.ClickstreamClusters
,
summary.ClickstreamClusters
Examples
clickstreams <- c("User1,h,c,c,p,c,h,c,p,p,c,p,p,o",
"User2,i,c,i,c,c,c,d",
"User3,h,i,c,i,c,p,c,c,p,c,c,i,d",
"User4,c,c,p,c,d",
"User5,h,c,c,p,p,c,p,p,p,i,p,o",
"User6,i,h,c,c,p,p,c,p,c,d")
cls <- as.clickstreams(clickstreams, header = TRUE)
clusters <- clusterClickstreams(cls, order = 0, centers = 2)
print(clusters)