Add a two pass algorithm to calculate covariance matrices. fc11-i386-build23 lenny-x64-build44 sid-i386-build91
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 17 Oct 2009 09:12:56 +0000 (11:12 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 17 Oct 2009 09:12:56 +0000 (11:12 +0200)
commit3bbe45fcc70f8d059b4bf6715d629209b50fa48e
tree4d5aebf946a009c9b84301b695390bea587cbeac
parent09e9433298a484353b1aac68018871553bee3d55
Add a two pass algorithm to calculate covariance matrices.

The single pass algorithm, although faster, is numerically unstable.
Furthermore, at can't reasonably be achieved when categorical variables
are involved.    This change implements a two pass algorithm and allows
the caller to choose which algorithm (s)he prefers.
src/language/stats/correlations.c
src/math/covariance.c
src/math/covariance.h