Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite954a72

Browse files
committed
Improve the accuracy of floating point statistical aggregates.
When computing statistical aggregates like variance, the commonschoolbook algorithm which computes the sum of the squares of thevalues and subtracts the square of the mean can lead to a large lossof precision when using floating point arithmetic, because thedifference between the two terms is often very small relative to theterms themselves.To avoid this, re-work these aggregates to use the Youngs-Crameralgorithm, which is a proven, numerically stable algorithm thatdirectly aggregates the sum of the squares of the differences of thevalues from the mean in a single pass over the data.While at it, improve the test coverage to test the aggregate combinefunctions used during parallel aggregation.Per report and suggested algorithm from Erich Schubert.Patch by me, reviewed by Madeleine Thompson.Discussion:https://postgr.es/m/153313051300.1397.9594490737341194671@wrigleys.postgresql.org
1 parent38921d1 commite954a72

File tree

3 files changed

+639
-262
lines changed

3 files changed

+639
-262
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp