I have 11 scale parameters for each of 218 observations belonging to subjects, I did standardized PCA to reduce dimensionality of the data and found two meaningful components. Using Euclidean distances this was followed by cluster analysis of these two components (explaining about 75% of the variance) with bottom-up approach using the hierarchical agglomerative clustering (HAC) by FactoMineR R package and Ward's linkage method. The optimal number of clusters was 4 as suggested by the package based on minimizing the ratio of two successive partition inter-clusters inertia gains.
This is just the number of observations per cluster:

> table(df$clust)

  1   2   3   4 
  6  21  46 145

These 4 clusters turned out to be clinically important and subjects with cluster 1 were severely affected by disease. Cluster 4 were non-reactive subjects, Cluster 3 showed some reaction, and finally cluster 2 was like a special entity protected from disease. I don't know if these clusters can assume some kind of ordinal ranking or not. It is difficult to judge from the theoretical point of view related to the field, but I can say that cluster 4->3->1 is somehow showing some direction, and hence could be regarded as ordinal, on the other hand, cluster 2 is a little bit different but very important as subjects with this clusters were protected from disease. So, I am really confused as whether to consider these 4 clusters ordinal or not.

Suppose that I have another set of 11 new readings of the scale parameters for one subject as new data, what statistical analysis would be useful to predict the membership of this subject to those 4 clusters? Could you please refer to a similar example with R code if possible? that would be greatly appreciated.

Providing a professional answer would be highly esteemed, but also recommending some books using R code would also be encouraged, as I am searching for such a book that covers this topic thoroughly, many books are out there but it is difficult to judge which one would do the job. May be someone, has more experience with this kind of problems and can give a word of advise here.


1 Answer 1


The usual approach would be to train a classifier on the resulting partitions (if possible, first clean the data, in particular fix any errors in the clustering).

There is not much to be gained from mixing clustering and classification/prediction. Use clustering to produce an initial working hypothesis, refine this hypothesis, then use prediction to generalize the refined hypotheis (not the raw clustering output) to data and evaluate how well it performs.

  • $\begingroup$ can you pls elaborate more on the approach you've mentioned. This is in general an unsupervised (clustering) based on training data followed by supervised (prediction of more than 2 classes, here 4) on test data (most probably would be a split set of the training set). What clustering method would do better, how to judge the performance? the other Q, would multinomial logistic regression perform here better than LDA, given the 4 classes? $\endgroup$
    – doctorate
    Commented Dec 4, 2013 at 12:39
  • $\begingroup$ Unsupervised clustering -> MANUAL analysis of clusters -> clean clustering result -> label -> split in train/test -> train and evaluate classifier. LDA vs. others: evaluate, don't have us guess what works on your data. $\endgroup$ Commented Dec 4, 2013 at 19:43
  • $\begingroup$ tks for this summarizing overview, it would be helpful if you know some good reading material that delved into this procedure in R using some dataset with lines of codes. $\endgroup$
    – doctorate
    Commented Dec 4, 2013 at 20:38
  • $\begingroup$ Training a classifier is exactly as usual. And there is no code for manual analysis of the clustering results, otherwise it would not be called manual. Again, don't use them blindly or as-is. Any clustering will have some errors that you need to fix. $\endgroup$ Commented Dec 4, 2013 at 22:07

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.