commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <>
Subject Re: [math] Univariate / StoreUnivariate interface cleanup
Date Sat, 21 Jun 2003 04:57:55 GMT
Mark R. Diggory wrote:
> I think its always wise now to consult before making interface changes. 
>  I'd like to make a couple cleanup changes in the Univariate and 
> StoreUnivariate Interfaces:
> (1) I don't think we really need getProduct in the Univariate interface 
> (unless we want it to be public and available to users like getSum and 
> getSumSq, which is another questionable method).

I would like to leave getSum and getSumSq in, since these are 
generically useful.  I would be fine with dropping getProduct.

>     /**
>      * Returns the product of the available values
>      * @return The product or Double.NaN if no values have been added.
>      */
>     abstract double getProduct();
> As getProduct is no longer used for geomean, now sumLog is used and 
> might be a more appropriate method to place in the interface.

I would not add sumLog

> (2) getKurtosis and getSkewness are now fully implemented in 
> UnivariateImpl, a while ago I added them to the Univariate interface, as 
> such they are not needed to be defined in the StoreUnivariate interface 
> (they are inherited). I'd like to remove them from there as they are 
> repetative.
> (3) I'd like to move getKurtosisClass and the static constants up to 
> Univariate, as getKurtosis is available there now.

I would not add these to Univariate. I understand your desire to keep 
them implemented in UnivariateImpl, but I do not want to force 
implementation of these statistics in the Univariate interface.  I agree 
with Al that these things have very limited practical use. Nowadays, 
graphical analysis and/or direct characterization of sample 
distributions, such as what EmpiricalDistribution provides, have pretty 
much obsoleted these summary measures for practical purposes.  Many 
contemporary introductory statistics texts omit them.

I would also suggest making skewness and kurtosis package-scoped in 
StatUtils, to keep the publicly exposed static methods to a minimum.


> -Mark
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message