Skip to main content
added 345 characters in body; added 134 characters in body
Source Link

Rather than reverse engineering the code, also check for references and literature. These algorithms often long predate sklearn.

Even Wikipedia has this equation, known as Lance Williams equations: https://en.wikipedia.org/wiki/Ward%27s_method

If I'm not mistaken, a subtle difference is that it works on the squared distances and uses the increase in variance, not the resulting variance.

The two means of the merged clusters are (0,1) and (2,0), so the first equation yields ⅔(2²+1²)=10/3=3⅓ (same as you got).

For the Lance Williams result, we need the squared distance first, which are 4 respectively 8. We then get ⅔.4+⅔.8-⅓.4=20/3. As mentioned on the Wikipedia talk page, there is the constant factor of 2 involved here.

Now sqrt(20/3) is just the value you got. You had one distance squared, and one non-squared, and the factor of two was missing.

Rather than reverse engineering the code, also check for references and literature. These algorithms often long predate sklearn.

Even Wikipedia has this equation, known as Lance Williams equations: https://en.wikipedia.org/wiki/Ward%27s_method

If I'm not mistaken, a subtle difference is that it works on the squared distances and uses the increase in variance, not the variance.

Rather than reverse engineering the code, also check for references and literature. These algorithms often long predate sklearn.

Even Wikipedia has this equation, known as Lance Williams equations: https://en.wikipedia.org/wiki/Ward%27s_method

If I'm not mistaken, a subtle difference is that it works on the squared distances and uses the increase in variance, not the resulting variance.

The two means of the merged clusters are (0,1) and (2,0), so the first equation yields ⅔(2²+1²)=10/3=3⅓ (same as you got).

For the Lance Williams result, we need the squared distance first, which are 4 respectively 8. We then get ⅔.4+⅔.8-⅓.4=20/3. As mentioned on the Wikipedia talk page, there is the constant factor of 2 involved here.

Now sqrt(20/3) is just the value you got. You had one distance squared, and one non-squared, and the factor of two was missing.

added 128 characters in body; deleted 292 characters in body
Source Link

Rather than reverse engineering the code, also check for references and literature. These algorithms often long predate sklearn.

Even Wikipedia has this equation, known as Lance Williams equations: https://en.wikipedia.org/wiki/Ward%27s_method

If I'm not mistaken, a subtle difference is that it works on the squared distances.

First of all, we compute and uses the reference value. The mean is (⅔,⅔)increase in variance, andnot the sum of squared errors then is ⅔²+⅔²+⅔²+(4/3)²+(4/3)²+⅔²=(4+4+4+16+16+4)/9=48/9=16/3=5.333.

The initial squared distances are 4 respectively 8variance.

Rather than reverse engineering the code, also check for references and literature. These algorithms often long predate sklearn.

Even Wikipedia has this equation, known as Lance Williams equations: https://en.wikipedia.org/wiki/Ward%27s_method

If I'm not mistaken, a subtle difference is that it works on the squared distances.

First of all, we compute the reference value. The mean is (⅔,⅔), and the sum of squared errors then is ⅔²+⅔²+⅔²+(4/3)²+(4/3)²+⅔²=(4+4+4+16+16+4)/9=48/9=16/3=5.333.

The initial squared distances are 4 respectively 8.

Rather than reverse engineering the code, also check for references and literature. These algorithms often long predate sklearn.

Even Wikipedia has this equation, known as Lance Williams equations: https://en.wikipedia.org/wiki/Ward%27s_method

If I'm not mistaken, a subtle difference is that it works on the squared distances and uses the increase in variance, not the variance.

added 167 characters in body; added 51 characters in body
Source Link

Rather than reverse engineering the code, also check for references and literature. These algorithms often long predate sklearn.

Even Wikipedia has this equation, known as Lance Williams equations: https://en.wikipedia.org/wiki/Ward%27s_method

If I'm not mistaken, a subtle difference is that it works on the squared distances.

First of all, we compute the reference value. The mean is (⅔,⅔), and the sum of squared errors then is ⅔²+⅔²+⅔²+(4/3)²+(4/3)²+⅔²=(4+4+4+16+16+4)/9=48/9=16/3=5.333.

The initial squared distances are 4 respectively 8.

Rather than reverse engineering the code, also check for references and literature. These algorithms often long predate sklearn.

Even Wikipedia has this equation, known as Lance Williams equations: https://en.wikipedia.org/wiki/Ward%27s_method

If I'm not mistaken, a subtle difference is that it works on the squared distances.

Rather than reverse engineering the code, also check for references and literature. These algorithms often long predate sklearn.

Even Wikipedia has this equation, known as Lance Williams equations: https://en.wikipedia.org/wiki/Ward%27s_method

If I'm not mistaken, a subtle difference is that it works on the squared distances.

First of all, we compute the reference value. The mean is (⅔,⅔), and the sum of squared errors then is ⅔²+⅔²+⅔²+(4/3)²+(4/3)²+⅔²=(4+4+4+16+16+4)/9=48/9=16/3=5.333.

The initial squared distances are 4 respectively 8.

added 60 characters in body
Source Link
Loading
Source Link
Loading