5
$\begingroup$

My data is is mostly continuous but has one binary variable. I tried the pam algorithm in R with the Gower index, but the number of clusters that give the best silhouette width is 2 – allowing the binary variable to completely dominate the result.

  • Is PAM the wrong approach?
  • Is it OK to choose a higher k just because it will give more meaningful results?
$\endgroup$
  • $\begingroup$ Why not to exclude that binary variable and see what'll be with just continuous ones? You'll be free to choose among various distance measures. Maybe euclidean will more apt that manhattan (gower for continuous data is the normalized manhattan). $\endgroup$ – ttnphns Jul 31 '13 at 5:15
1
$\begingroup$

If the binary variable is not very useful, try putting less weight on it.

There is nothing wrong with having a domain expert manually assign weights to different attributes to help the algorithm find new information. That the binary attribute splits the data into two is a correct result, now you want to find something new, so either remove it (weight 0) or at least reduce the weight.

$\endgroup$
1
$\begingroup$

To better justify the chosen number of clusters (k) you can use other partition quality indices than Silhouette width. Example indices based on arbitrary dissimilarity are: Caliński & Harabasz index (chosen as the best in Milligan and Cooper study 1985 and as 4th best in Dimitriadou et al. 2002) generalized for dissimilarities, Dunn index, Gamma index, C index etc. A selection of these and other quality indices is provided by e.g. R's cluster.stats function included in fpc package.

It is common to then choose the k returned by majority of the computed indices, as the final one.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.