You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2010/07/15 00:02:49 UTC
[jira] Commented: (MATH-384) DescriptiveStatistics based on
double[]
[ https://issues.apache.org/jira/browse/MATH-384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888565#action_12888565 ]
Phil Steitz commented on MATH-384:
----------------------------------
+1 to add the functionality. Another approach would be to simply add a method addValues(double[]) to DescriptiveStatistics. This would be a little tricky to implement efficiently (possibly requiring modifications to ResizeableDoubleArray) but maybe a little simpler from an interface perspective.
Yet another idea to consider is to create a value interface (or possibly better a class) similar to StatisticalSummaryValues including all of the statistics maintained by DescriptiveStatistics and then just add a static method to StatUtils that takes a double[] and returns one of these. The same could be done for StatisticalSummaryValues - methods named descriptiveStatistics(double[]) and statisticalSummary(double[]).
Any other ideas or reasons that any of these are not good?
> DescriptiveStatistics based on double[]
> ---------------------------------------
>
> Key: MATH-384
> URL: https://issues.apache.org/jira/browse/MATH-384
> Project: Commons Math
> Issue Type: New Feature
> Reporter: Mikkel Meyer Andersen
> Priority: Minor
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> Right now the DescriptiveStatistics is for ResizableDoubleArray, but if the user has the double[] data she wishes to get DescriptiveStatistics for there is no way of doing this (besides the inefficient way of creating a ResizableDoubleArray from the double[]).
> It would be possible to use StatUtils, but it does not contain near as much functionality as DescriptiveStatistics.
> Idea: Create a DescriptiveStatistics for double[] also. I'm not sure which way of implementing it would be the best, but one way would be to make DescriptiveStatistics abstract with all but the apply-method implemented as now. The apply-method should be made as abstract which then has to implemented in the extensions together with a field containing the values. (addValue, windowSize etc. has to go in the ResizableDoubleArray-extension.) The double[]-extension should then have a constructor taking double[] as a parameter.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.