How to cluster user historical data? I have transactional-level users data that includes their behaviour, such as reading articles, searching for content, posting, etc. I would like to cluster (most probably K-Means) these users based on aggregated metrics, For eg. SUM(articles read), SUM(searches), etc.
As users sign up at different times across years, they may be at very different cycles of their activity levels (first 30 days? inactive? etc.) So I was wondering what would be an appropriate time window to aggregate relative to each user. Should I just take all user activities in the past 30 days? Or for each user's first 30 days / their peak month? Or just simple averaging per month?
Averaging seems straightforward but for users who are on the site longer the average may be much lower than say, users who has been using the platform for only a month.
If you have a whole year data, use the moving window technique, thus you'll have diffrent clusters each month (since users cycles can change), after that, I don't think you should use averaging because it does not take into consideration the times series aspects, which means clusters from the beginning of the year can be very different from the recent ones, you better attribute different weights to different clusters.
I recommend using Subsequence TimeSeries Clustering since it cluster data and it's based on its temporal aspect.
This research paper might help you out Subsequence Clustering
and this is the source code that you can start with Incremental Subsequence Clustering.