Question summary
This question pertains to analyzing dissimilarities between discrete state sequences (e.g., using TraMineR
), more specifically to classifying new, previously unseen sequences based on the cluster solution from earlier analytical steps.
What we have
The analytical situation at hand is as follows:
- We have a number of sequences (e.g., life course) with a defined alphabet. For example, family situation at year 1, year 2, and so forth.
- We have computed a dissimilarity matrix $D$ between our sequences, e.g., using Optimal Matching (OM).
- We have clustered the sequences at hand into $K$ clusters, e.g., using Partitioning Around Medoids (PAM).
What we want to have
Suppose we have a new, previously unseen sequence $s$, and we want to assign it to one of the $K$ clusters. The most straightforward strategy would probably be to re-run the entire cluster analysis and examine to which cluster $s$ belongs and whether it influenced the clustering solution. A problem with this approach is that the entire dissimilarity matrix $D'$ and the entire clustering solution need to be constructed from scratch, and for larger samples (e.g., $N > 30000$) this is computationally unfeasible.
Possible avenues
From a cursory review of available information in this respect, it seems that there are K-means
family algorithms that can assign new observations to classes. However, these seem to work with raw data to obtain distances, and not with distance/dissimilarity matrices that OM produces. This question offers a workaround to obtain Euclidean distances from the dissimilarity matrix $D$. I'm not sure whether this is a robust method, though, and would love to hear some comments on it.
Another, perhaps very primitive approach would be to calculate OM distances between $s$ and $K$ medoid sequences from the initial solution, and pick the shortest one. Again, I feel that there might be complexities there, that this approach cannot account for (aside the fact that $s$ itself may change the structure of the solution).
Any suggestions are welcome. Thank you in advance for your thoughts.