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

Gilles Sadowski commented on STATISTICS-54:
-------------------------------------------

{quote}When we say "We would incorporate the functionality directly into a new 
module in the Statistics project" this means we would create a new module in 
the commons-statistics project,
{quote}
Yes.
{quote}porting over the StorelessUnivariateStatistic currently implemented in 
commons-math-legacy/stat/descriptive package.
{quote}
The concept covered in the {{o.a.c.math4.legacy.stat.descriptive}} should 
indeed be ported to the "Statistics" component.
Can any of the classes/interfaces be simply copied? Probably not: There are 
long-standing issues with the (old) design in "Commons Math" (see e.g. 
MATH-1016, MATH-1364, MATH-1228, MATH-1642, MATH-1042, MATH-1281, MATH-1398, 
MATH-1159).
{quote}Would the goal of this project be to implement collectors on all 
implementations of StorelessUnivariateStatistic
{quote}
Sure; anything deemed useful and within the project's scope can be implemented.
{quote}[...] support callers passing custom `statistic implementation` while 
computing SummaryStatistics ?
{quote}
Such as?
{quote}[...] allow for callers to supply their own custom implementations if 
need be.
{quote}
In general, we aim at providing implementations (so that people don't have to 
recode them). If they have their own code/want to use their own implementation, 
why would they call our code?
{quote}[...] duplicate a lot of computations between classes
{quote}
To be avoided, IMHO.
{quote}Maybe we can group the common functionality in a separate class and 
share this between the depending classes
{quote}
Maybe, maybe not ;). Do you have a prototype?

{quote}
{code}
public static StandardDeviation with(SumOfSquareDeviationFromMean);
{code}
{quote}

What's the definition of {{SumOfSquareDeviationFromMean}}?
Does it store data?

{quote}
We could also have two factory constructor methods in the SummaryStatistics 
class.
{code}
public static DoubleStatisticSummary of(Statistic... statistics); // include 
Statistic values specified
public static DoubleStatisticSummary of(); // include ALL Statistic values 
{code}
{quote}

I suspect (?) that calling the second would lead to a compiler error (ambiguous 
call).
If we define an "enum" (as suggested by Alex), can include an "ALL" element to 
the same effect without bloating the API.


> [GSoC] Summary statistics API for Java 8 streams
> ------------------------------------------------
>
>                 Key: STATISTICS-54
>                 URL: https://issues.apache.org/jira/browse/STATISTICS-54
>             Project: Commons Statistics
>          Issue Type: Wish
>          Components: descriptive
>            Reporter: Alex Herbert
>            Priority: Minor
>              Labels: full-time, gsoc, gsoc2022, gsoc2023
>             Fix For: 1.0
>
>
> Placeholder for tasks that could be undertaken in this year's 
> [GSoC|https://summerofcode.withgoogle.com/].
> Ideas:
> - Design an updated summary statistics API for use with Java 8 streams based 
> on the summary statistic implementations in the Commons Math 
> {{stat.descriptive}} package including {{{}moments{}}}, {{rank}} and 
> {{summary}} sub-packages.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to