8
$\begingroup$

I've recently entered the realm of machine learning and a project I am working on requires me to cluster users based on the order they visited webpages on a website. I have data in the form of:

['user_id', 1, 2, 4, 6, 3, 7, 3, 2, 4...]

Where each number is a category/page that the user visited. In addition the length of data for each user is not the same i.e. some users visit more pages than others.

I realize this is really vague and defining similarity it hard. I tried following the example in this research paper and to be honest a lot of it went over my head.

I need help in how to approach this problem and am open to new ideas and suggestions.

$\endgroup$
3
$\begingroup$

It is a good question with many practical applications.

Your data are sequential so we need a similarity measure between any pair of sequences. I recommend Levensthein distance since it is very intuitive and very nicely defined. See also this nice bachelor thesis with an overview of more measures for sequential data.

Finally, if one has the distances between all pairs of sequences, we can use any clustering algorithm that takes a distance matrix as input (for example any hierarchical algorithm).

| cite | improve this answer | |
$\endgroup$
2
$\begingroup$

You can use package clickstream or clickclust in R language. It performs exactly what you are looking for.

| cite | improve this answer | |
$\endgroup$
  • 2
    $\begingroup$ This is really better suited as a comment than an answer. $\endgroup$ – Silverfish Jul 27 '16 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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