hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-3455) ANSI CORR(X,Y) is incorrect
Date Thu, 05 Dec 2013 06:32:40 GMT

    [ https://issues.apache.org/jira/browse/HIVE-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839866#comment-13839866
] 

Hive QA commented on HIVE-3455:
-------------------------------



{color:green}Overall{color}: +1 all checks pass

Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12617110/HIVE-3455.1.patch.txt

{color:green}SUCCESS:{color} +1 4458 tests passed

Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/525/testReport
Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/525/console

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12617110

> ANSI CORR(X,Y) is incorrect
> ---------------------------
>
>                 Key: HIVE-3455
>                 URL: https://issues.apache.org/jira/browse/HIVE-3455
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.7.1, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.11.0, 0.12.0
>            Reporter: Maxim Bolotin
>            Assignee: Maxim Bolotin
>              Labels: patch
>         Attachments: HIVE-3455.1.patch.txt, HIVE3455.corrTest.tar.gz, my.patch
>
>
> A simple test with 2 collinear vectors returns a wrong result.
> The problem is the merge of variances, file:
> http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCorrelation.java?revision=1157222&view=markup
> 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;



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message