commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] [Commented] (MATH-1133) NaNStrategy for UnivariateStatistic and friends
Date Fri, 27 Jun 2014 14:15:29 GMT


Phil Steitz commented on MATH-1133:

We should discuss on the mailing list.  My inclination is to leave things as they are.   NaNStrategy
exists because for rank transformations we *have* to do something special for NaNs.  In floating
point computations, we have traditionally just allowed NaNs to propagate. 

> NaNStrategy for UnivariateStatistic and friends
> -----------------------------------------------
>                 Key: MATH-1133
>                 URL:
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Sergei Lebedev
>            Priority: Minor
> In the current implementation univariate statistics don't allow to specify NaN behaviour.
For instance, the following code simply yields NaN as the result.
> {code:java}
> Mean mean = new Mean();
> mean.increment(42);
> mean.increment(Double.NaN);
> System.out.println(mean.getResult());  // prints 'NaN'.
> {code}
> Is it possible to parametrize all available statistics by NaNStrategy with the default
behaviour being a no-op?

This message was sent by Atlassian JIRA

View raw message