Al Chou wrote:
>--- mdiggory@apache.org wrote:
>
>
>>mdiggory 2003/06/16 07:29:31
>>
>> Modified: math/xdocs developers.xml
>> math/src/java/org/apache/commons/math/stat
>> UnivariateImpl.java
>> math/src/test/org/apache/commons/math/stat
>> CertifiedDataTest.java
>> Log:
>> PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20782
>> Submitted by: HotFusionMan@Yahoo.com
>>
>> I added this, but there are changes I'd like to make in the near future.
>>Only the "running" aspects of the variance calc should be in the insertValue
>>function, all other calculation should be in the getVariance function.
>>
>>
>
>OK, that sounds reasonable. Also, I was starting an Extract Method refactoring
>to reduce duplication among the windowSize != n and infinite window branches of
>insertValue.
>
>
>Al
>
Yes, this is the direction I am working on as well. Lets try to
coordinate our efforts.
(1) I'm looking to setup "true deligation" where UnivariateImpl is
actually an extension of AbstractStoreUnivariate and deligates to these
methods when doing stored processing. This would simply look like:
/**
* @see org.apache.commons.math.stat.Univariate#getMean()
*/
public double getMean() {
if (windowSize != Univariate.INFINITE_WINDOW) {
return super.getMean();
}
return mean;
}
(2) I want to apply the same strategy used in your mean and variance
calculations for skew and kurt. The getters for these properties then
would truely just be "getters" without the calculations occuring in them
as well. This means the sum of powers code goes away for now.
(3) I want to derive an methodology for the same two-pass algorithm for
skew and kurt, hey, if we can't find published work on it, then theres a
possibly paper in the future for someone to write!
-Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org