2
$\begingroup$
  1. Part: I wonder if one could calculate the Calinski-Harabasz index when only having a distance matrix (and a cluster solution, of course). As you need the within and between sum of squares to come up with this so called Pseudo-F index, you also need some sort of (continous) raw data, right?

  2. Part: Except that you have a distance matrix that you can be sure contains euclidean distances. You could than come up with the within and between sum of squares based on those euclidean distances, right?

Am I mistaken?

Context: I am working with sequence data at the moment, and there are several ways to prepare them for clustering (I am not bothering you with the details here). One way is to directly come up with some distance metrics based on some global similarities/properties of the sequences - and they are all non-euclidean. If you are interested: here you are.

$\endgroup$
3
  • 1
    $\begingroup$ Computing them on a distance matrix is O(n²), but usually you would use an O(n) approach to compute them using the total variance and the cluster variances. $\endgroup$ Commented Aug 24, 2019 at 6:28
  • $\begingroup$ Thanks for you comment. My question is more about the theoretical feasibility and whether I'm right that it can only be done with euclidean distances. But I think that is answered. Thank you very much. $\endgroup$
    – MLud
    Commented Aug 24, 2019 at 6:40
  • $\begingroup$ If the slow runtime isn't a problem for you, then you can also use Silhouette, which works with non-Euclidean data. $\endgroup$ Commented Aug 24, 2019 at 6:44

1 Answer 1

2
$\begingroup$
  1. Calinski-Harabasz criterion and similar clustering indices based on ANOVA terms SSbetween, SSwithin, SStotal, can still be computed from the distance matrix between the objects, albeit computing them from objects x features dataset are simplier. Here is how to do it. Besides, you can always turn a distance matrix into a objects x features dataset by means of Multidimensional Scaling (MDS).

  2. From the euclidean geometry p.o.w. (and, mind, things like means, squared deviations from means etc. are based - meaninfully like in ANOVA - on Euclidean space) the only correct would be to use (squared) euclidean distance matrix. Other metric but not euclidean distances could be used heuristically, but geometrically that isn't quite right.

Please visit my web page and download/read a description doc. about "Internal clustering criteria".

If your initial data are dissimilarities which are far not euclidean and probably non-metric, yet you insist to use measures like Calinski-Harabasz after clustering, I would recommend to do MDS to embed the dissimilarities in euclidean space, and then process the objects x dimensions dataset the usual way.

$\endgroup$
3
  • $\begingroup$ So, if I understood you correctly, you are also saying that one can only come up with the SSb, SSw, SSt (your 1.) when having access to (squared) euclidean distances (my 2), right? $\endgroup$
    – MLud
    Commented Aug 23, 2019 at 18:23
  • $\begingroup$ Ah, saw you edit just now. Thanks for clarifying and your answer! $\endgroup$
    – MLud
    Commented Aug 23, 2019 at 18:25
  • 1
    $\begingroup$ Yes, you must have euclidean distances to correctly assess these quantities. $\endgroup$
    – ttnphns
    Commented Aug 23, 2019 at 18:26

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.