commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (MATH-704) One of Variance.evaluate() methods does not work correctly
Date Tue, 29 Nov 2011 20:19:40 GMT

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

Thomas Neidhart edited comment on MATH-704 at 11/29/11 8:19 PM:
----------------------------------------------------------------

I have found a small bug wrt this bug report. The sum of the weights is calculated on the
whole weight array rather than the specified sub-array [begin, begin + length).

See the attached patch for more details. Still need a testcase to verify that it finally addresses
the original bug report.
                
      was (Author: tn):
    I have found a small bug wrt this bug report. The sum of the weights is calculated on
the whole weight array rather than the specified sub-array [begin, begin + length)
                  
> One of Variance.evaluate() methods does not work correctly
> ----------------------------------------------------------
>
>                 Key: MATH-704
>                 URL: https://issues.apache.org/jira/browse/MATH-704
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: Java 1.6
>            Reporter: Leonid Ilyevsky
>            Assignee: Phil Steitz
>             Fix For: 3.0
>
>         Attachments: MATH-704.patch
>
>
> The method org.apache.commons.math.stat.descriptive.moment.Variance.evaluate(double[]
values, double[] weights, double mean, int begin, int length) does not work properly. Looks
loke it ignores the length parameter and grabs the whole dataset.
> Similar method in Mean class seems to work.
> I did not check other methods taking the part of the array; they may have the same problem.
> Workaround: I had to shrink my arrays and use the method without the length.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message