0
$\begingroup$

I have observations of individuals over time, where they either experience -1, +1 or mostly 0, like so.

t 1 2 3 4 5 6 7 8 9 10

a 0 0 0 -1 0 0 0 0 0 1
b -1 0 0 0 -1 0 0 0 0 0
c 0 0 0 0 0 0 0 0 -1 0 

In this case a and b could belong to a similar group, as they have undergone the same change at approximately the same time t.

I would like to cluster these individuals according to their similarity in behaviour. I would like to do this over a temporal horizon, meaning that similar changes to not have to occur at the same time, but in a given span around that change.

Which algorithms should I be trying out and what would I need to be looking out for?

$\endgroup$
5
  • 1
    $\begingroup$ Are the lengths of all time series the same? Are the time points properly "synchronised", meaning that a specific time point has the same meaning for all observations? (If this is not the case, there are methods of registration and "time warping" to synchronise time series that are not in line, however your wording suggests that this is not required here?) $\endgroup$ Commented Nov 5, 2021 at 16:48
  • $\begingroup$ Not all series are of the same length, but I could just fill the rest with zeros. Otherwise each point in time has the same meaning for all individuals. $\endgroup$
    – SimonDude
    Commented Nov 5, 2021 at 17:30
  • $\begingroup$ "but I could just fill the rest with zeros" - this would only be appropriate if a missing value essentially had the same meaning as a zero. $\endgroup$ Commented Nov 5, 2021 at 17:41
  • $\begingroup$ That would just mean that in this period nothing happened to that individual, which would be fine $\endgroup$
    – SimonDude
    Commented Nov 5, 2021 at 17:44
  • 1
    $\begingroup$ One could define a tailor-made distance measure between series that formalises what it means for them to be (dis)similar. Then distance-based clustering methods as mentioned in the response of user0123456789 could be applied. All the involved decisions depend strongly on the meaning of the data and the aim and later use of clustering, so without knowing the full background this is hard. It requires more information and some work thinking it through. If you're interested, you can contact me off site - I use my real name so you should find me on the web (the term "cluster" may help). $\endgroup$ Commented Nov 5, 2021 at 17:54

1 Answer 1

0
$\begingroup$

Hierarchical cluster analysis (HCA), which results in a heat map and dendograms (tree branches) is what you could use. It would cluster together individuals with similar time profiles. If you don't know what HCA is, just search on "dendograms cluster analysis." There are other methods you could use, but first things first. You will like HCA, since it's one of the most informative methods in knowledge discovery and pattern recognition.

Below is an example output of an HCA run for n=63 pediatric tumors (individuals) and expression of 23 genes, which are informative for class prediction. You can notice that the four types of tumors cluster together (agglomerate) very well.

enter image description here

$\endgroup$
4
  • 1
    $\begingroup$ There are many different methods of HCA, and they all depend on the involved dissimilarity measure, which you don't comment on. In fact there may be a suitable HCA method with a suitable distance, but the answer doesn't help with how to choose the ingredients. $\endgroup$ Commented Nov 5, 2021 at 16:43
  • $\begingroup$ Great comments, HCA was a suggestion, with example output provided to expand horizons of the user. Everyone knows there are numerous metrics and agglomeration methods for HCA - but the OP is not asking about those. $\endgroup$
    – user318288
    Commented Nov 5, 2021 at 20:54
  • 1
    $\begingroup$ This is not appropriate, methods based on distances do not take into consideration the spatial or time considerations. For ex. the sequence 1 0 0 0 0 would have the same distance as 0 0 0 0 1, compared to a reference 0 1 0 0 0, and they would be treated as equal, even though the first sequence is more close to the reference. $\endgroup$ Commented Nov 9, 2021 at 8:14
  • $\begingroup$ @user2974951 - The OP does not ask about which distance metric to use. However, distance/correlation/covariance between binary vectors has been discussed here: stats.stackexchange.com/questions/510993/… . So the user who asked the question may want to invoke something like Jaccard distance. $\endgroup$
    – user318288
    Commented Nov 9, 2021 at 17:17

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.