2
$\begingroup$

I'd like to assess how scattered a cluster of binary vectors $X_j$ is, and as I understand the conventional way for doing this is:

$$ S = \frac{1}{T} \sum_{j}^{T}\|X_j-A_j\|_p, $$

where $A_j$ is the centroid of the cluster and $\|X_j-A_j\|_p$ is the distance between the centroid and the individual vector.

So my question is how to compute $A_j$ for Gower distances (and if there's an existing R implementation I could use, it'd also be great).

$\endgroup$
9
  • 1
    $\begingroup$ Your question is not clear enough. (1) Do by "centroid" you mean what is usually meant by the word: the multivariate arithmetic mean? Or another sort of centre (what then)? (2) Does || in your notation just indicate that the distance b\w the point and the centroid is squared? And what distance - is that Euclidean distance? (Note that "Gower distance" is conventionally defined between data points, not between a data point and some centre.) $\endgroup$
    – ttnphns
    Sep 27, 2014 at 9:10
  • 1
    $\begingroup$ Info about Gower coefficient you might find helpful: stats.stackexchange.com/a/15313/3277 $\endgroup$
    – ttnphns
    Sep 27, 2014 at 9:13
  • $\begingroup$ Thanks for asking for clarification. Perhaps my question would be best phrased as: what is the best measure of centre and distance from it to compute the tightness of a cluster of binary vectors? $\endgroup$
    – a11msp
    Sep 27, 2014 at 12:20
  • $\begingroup$ You may ask your new question or edit this one accordingly, if you like. One of possible answers might be then: If the data are truly categorical for you so that the idea of an "underlying" continuous traits is unwelcome then cluster can't have any "centre" inside. Its multivariate mode will express its "central tendency". $\endgroup$
    – ttnphns
    Sep 27, 2014 at 12:30
  • 1
    $\begingroup$ One of possible measures of cluster tightness (homogeneity) when features are nominal is entropy. To compute: 1) for each category of feature (in your case, your features have 2 categories each), compute proportion of objects falling in that category in this cluster, 2) multiply the proportion by its logarithm, 3) sum up such terms (products) across all the categories and invert sign. That will be cluster's entropy by the current feature. 4) Sum up entropies across all features. The smaller is the quantity the tighter is the cluster. $\endgroup$
    – ttnphns
    Sep 27, 2014 at 14:18

1 Answer 1

1
$\begingroup$

Methods such as PAM (aka: k-medoids) simply choose the most central object as representative, aka medoid. This works for arbitrary distance functions, so it will also work for Gower.

$$ A:=\mathop{argmin}_{X_j\in D} \sum_i^T d(X_j,X_i) $$

$\endgroup$

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.