2
$\begingroup$

There is an example on the computation of Gower's similarity coefficient on the page,

Gower's similarity coefficient

I am trying to work out the similarity manually between patient 1 and 2, however my computation is giving me completely different results. Here is the formula I use, in the order of the variables and their types $$ \frac{\left(1*\left(1 - \left(\frac{150-120}{150-110}\right)\right)+ 0 + 1 + 1 + 0\right)}{5} $$ I still cannot get the 0.0625 as indicated in the example. What am I doing wrong?

$\endgroup$
1
  • $\begingroup$ Welcome to the site, @Nimonika. I took the liberty of adding $\LaTeX$ to your equation to make it easier to read. Please make sure it still says what you want. If not you could edit it or rollback. $\endgroup$ Jan 29 '13 at 23:09
1
$\begingroup$

For binary attributes, the weight will not always be 1. "Hallucination" is supposed to be ignored altogether in that example.

This yields: $$ \frac{(1-(\frac{150-120}{150-110})+0+0+0+0}{1+1+1+0+1} = 1/16 $$

$\endgroup$
2
  • $\begingroup$ Many thanks for your answer. Please could you provide a little more explanation. In the table that they have below the example, they have assigned a weight to hallucination as 1 and the actual values for the two patients are also "1", i.e., similar. So as per the rules for binary variables should the value and weight not be considered as "1" instead of "0"? Unless of course 2 means "+" and 1 means"-". $\endgroup$
    – Nimonika
    Jan 30 '13 at 9:33
  • $\begingroup$ That is a manual feature weighting, that probably will be multiplied to the Gower weights. And yes, my guess is that 1 = negative, and 2 = positive in their data set. I don't use Clustan. $\endgroup$ Jan 30 '13 at 9:42

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.