oh i see... my bad... thanks for clearing things up.

On Mon, Apr 25, 2011 at 12:06 AM, Sean Owen <[email protected]> wrote:

> sumX is definitely not (necessarily) 0, no.
>
> Let mx and my be the means of X and Y. To compute the centered sum of XY,
> we
> are computing:
> sum( (X-mx)(Y-my) )
>
> This is
>
> sum( XY - mx*Y - my*X + my*mx )
> or
> sum(XY) - sum(mx*Y) - sum(my*X) + sum(my*mx)
> or
> sum(XY) - mx*sum(Y) - my*sum(X) + n*my*mx
>
> The last observation is that n*my = sum(Y) so you can cancel terms 2 and 4.
> (Or because n*mx = sum(X) you could also as well cancel 3 and 4)
>
> This leaves
>
> sum(XY) - my*sum(X)
>
> On Sun, Apr 24, 2011 at 4:54 PM, Shem Cristobal <[email protected]
> >wrote:
>
> > It was assumed that sumX is 0 so
> >
> > double centeredSumXY = sumXY - meanY * sumX;
> >
> > reduces to
> >
> > double centeredSumXY = sumXY;
> >
> > right?
> >
> >
> >
> >
> > On Sun, Apr 24, 2011 at 11:36 PM, Sean Owen <[email protected]> wrote:
> >
> > > It's correct. :) Want to show your working or me to post the
> derivation?
> > >
> > > On Sun, Apr 24, 2011 at 4:07 PM, Shem Cristobal <
> > [email protected]
> > > >wrote:
> > >
> > > > Has anyone seen this line 235 (and line 313) of
> > AbstractSimilarity.class?
> > > >
> > > > double centeredSumXY = sumXY - meanY * sumX;
> > > >
> > > > This is so wrong and should be replaced by
> > > >
> > > > double centeredSumXY = sumXY - meanY * meanX;
> > > >
> > > >
> > > >
> > > > Best regards,
> > > >
> > > > @shemcristobal
> > > >
> > >
> >
> >
> >
>


Best regards,

@shemcristobal

Reply via email to