predict.ClickstreamClusters {clickstream} | R Documentation |
Predicts the Cluster for a Given Pattern Object
Description
Predicts the cluster for a given Pattern
object. Potential clusters
need to be identified with the method clusterClickstreams
before
predicting the cluster.
Usage
## S3 method for class 'ClickstreamClusters'
predict(object, pattern, ...)
Arguments
object |
A |
pattern |
Sequence of a user's initial clicks as |
... |
Ignored parameters. |
Value
Returns the index of the clusters to which the given Pattern
object most probably belongs to.
Author(s)
Michael Scholz michael.scholz@th-deg.de
See Also
clusterClickstreams
,
print.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)
pattern <- new("Pattern", sequence = c("h", "c"))
predict(clusters, pattern)
[Package clickstream version 1.3.3 Index]