I am trying to cluster users based on the page categories they have visited in order to better understand the different user types. My data has the format:



If a user has been in a category, the value is 1, if not, it is 0. I have tried a few different approaches, e.g.:

D=daisy(ga_new, metric='gower')
H.fit <- hclust(D, method="ward")
groups <- cutree(H.fit, k=3)
clusplot(ga_new, groups, color=TRUE, shade=TRUE,
         labels=5, lines=0, main= 'user segments')

user segmentation

After having read how to interpret the results, I am not too sure whether this has been the right approach, given that it is difficult to derive solutions here: what categories do the clusters now include? Any suggestions how to approach this differently?

  • $\begingroup$ Have you considered association rules as a means of clustering? $\endgroup$
    – lrnzcig
    Apr 21, 2017 at 13:17
  • $\begingroup$ Aren't the categories already segments? $\endgroup$ Apr 22, 2017 at 14:28
  • $\begingroup$ @lrnzcig, thanks for the suggestion, I will try that. $\endgroup$
    – Ryan
    Apr 23, 2017 at 16:25
  • $\begingroup$ @Anony-Mousse, no because a user could be interested in more than one category, and I would like to find out which categories belong together. As an example, what other areas do users look at apart from the jobs section? Do we need to enhance the content there? $\endgroup$
    – Ryan
    Apr 23, 2017 at 16:26

1 Answer 1


After having tried several approaches, I guess the best approach for clustering users with respect to the content that they have viewed is using a hierarchical clustering. Plotting the data into a dendrogram will show the clusters that can be further analyzed by cutting.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.