Details
Description
A simple test with 2 collinear vectors returns a wrong result.
The problem is the merge of variances, file:
lines:
347: myagg.xvar += xvarB + (xavgA - xavgB) * (xavgA - xavgB) * myagg.count;
348: myagg.yvar += yvarB + (yavgA - yavgB) * (yavgA - yavgB) * myagg.count;
the correct merge should be like this:
347: myagg.xvar += xvarB + (xavgA - xavgB) * (xavgA - xavgB) / myagg.count * nA * nB;
348: myagg.yvar += yvarB + (yavgA - yavgB) * (yavgA - yavgB) / myagg.count * nA * nB;
Attachments
Attachments
Issue Links
- is related to
-
HIVE-1549 Add ANSI SQL correlation aggregate function CORR(X,Y).
- Closed