commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ajo Fod (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-978) StorelessCovariance to be map/reducable
Date Tue, 21 May 2013 17:01:19 GMT

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

Ajo Fod commented on MATH-978:
------------------------------

Code for StorelessBivariateCovariance:

    /**
     * Appends another covariance calculation to this.
     */
    public void append(StorelessBivariateCovariance cov) {
        double oldN = n;
        n += cov.n;
        final double deltaX = cov.meanX - meanX;
        final double deltaY = cov.meanY - meanY;
        meanX += deltaX * cov.n / n;
        meanY += deltaY * cov.n / n;
        covarianceNumerator+= cov.covarianceNumerator + oldN*cov.n/n*deltaX*deltaY;
    }

                
> StorelessCovariance to be map/reducable
> ---------------------------------------
>
>                 Key: MATH-978
>                 URL: https://issues.apache.org/jira/browse/MATH-978
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Ajo Fod
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Current version of StorelessCovariance and StorelessBivariateCovariance don't allow adding
another StorelessCovariance to an existing one. With this feature it is possible to run maps
on different data sets and then do a final reduce to get the overall covariance.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message