2
$\begingroup$

I have a dataset of the number of steps people take throughout a day over a period of months. I aggregated them so that each person will have an average weekday and weekend time series of steps. An example is below:

ID Weekday 00:00 00:30 01:00 ........ 23:00 23:30
A    1       20    30    23             154  256
A    0       15    67    121            35   101
B    1       78    21    46             78   26
B    0       55    301   22             121  451

I have tried clustering using K-means, agglomerative hierarchical and dynamic time warping by combining both weekdays and weekends together (i.e each person only has 1 case of data), and it appears to show 2 distinct groups of people, one group with generally higher levels than the other group.

How can I do clustering while also taking in account whether it is on a weekday or weekend? So for example, there might be a few clusters: one with high weekday activity and low weekend activity, one with high - high, another with low - low, etc?

I am not sure what the terminology is in this case: multidimensional time series? multivariate clustering?

$\endgroup$
1
$\begingroup$

As you don't do any alignments you can simply concatenate the two vectors.

KMeans will then minimize variance in both weekdays and weekends.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Can I use hierarchical clustering if I concatenate them together? $\endgroup$ – TYL May 13 '19 at 1:58
  • $\begingroup$ And would you suggest using kmeans or hierarchical for my data? $\endgroup$ – TYL May 13 '19 at 3:00
  • $\begingroup$ Depends on what objective function you deem more appropriate for your problem. $\endgroup$ – Has QUIT--Anony-Mousse May 13 '19 at 6:15

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.