The Ward's method is taking distance as how much the sum of squares will increase when we merge them.
$d(u,v) = \frac{|u||v|}{|u|+|v|}{|m_u-m_v|}^2$
Please refer to Page 3 of link below.
But, from Scipy implementation from github. https://github.com/scipy/scipy/blob/master/scipy/cluster/hierarchy.py
The distance is derived as below.
$d(u,v) = \sqrt{\frac{|v|+|s|}{T}d(v,s)^2 + \frac{|v|+|t|}{T}d(v,t)^2- \frac{|v|}{T}d(s,t)^2}$
I am wondering what happend between these two equations. They even do not result same value for the same merge.
I tested on merging [(0,0),(0,2)] and [(2,0)]. Upper one gives me value of 3.333... Bottom one gives me values of 2.581988...
Why they have difference?