Re: [commons-math] Three Concerns

2023-08-05 Thread Gilles Sadowski
Hello.

Le sam. 5 août 2023 à 08:08, Hasan Diwan  a écrit :
>
> I'm trying to migrate an internal service for interpolation to commons-math
> 3.6.1, using org.apache.commons.math3.fitting.GaussianCurveFitter.

Thanks for your interest in "Commons Math".
For any new code, you should use the latest version (currently, v4.0-beta1).
Version 3.6.1 is 7 years old.[1]

> My
> thoughts on this method:
>
> - The fit() function returns a double[], what the numbers mean is missing
> from the javadoc. I can write the doc, but just need to know what they
> should be.

It is documented (at least in v4.0-beta1).

> This is the quick fix, but I feel we should consider having the
> method return a Map where the key could be a descriptive
> label of what it means.

I'm not sure it adds anything to the API; a caller would have to
know the list of keys, instead of the list of indices.

> This would be in addition to the javadoc addition
> mentioned earlier.
>
> - Exceptions that are thrown by the fit() method ought to inherit from
> Exception instead of RuntimeException.
>
> - If the mean of my data is 1.54 and its standard deviation is 0.24, how is
> the interpolation using the GaussianCurveFitter yielding 5.58, when all the
> x-values differ by 1?
>

I don't know.  More details should be provided, as requested on the JIRA
ticket which you reported.[2]

Regards,
Gilles

[1] https://commons.apache.org/proper/commons-math/changes-report.html
[2] https://issues.apache.org/jira/browse/MATH-1663

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



[commons-math] Three Concerns

2023-08-05 Thread Hasan Diwan
I'm trying to migrate an internal service for interpolation to commons-math
3.6.1, using org.apache.commons.math3.fitting.GaussianCurveFitter. My
thoughts on this method:

- The fit() function returns a double[], what the numbers mean is missing
from the javadoc. I can write the doc, but just need to know what they
should be. This is the quick fix, but I feel we should consider having the
method return a Map where the key could be a descriptive
label of what it means. This would be in addition to the javadoc addition
mentioned earlier.

- Exceptions that are thrown by the fit() method ought to inherit from
Exception instead of RuntimeException.

- If the mean of my data is 1.54 and its standard deviation is 0.24, how is
the interpolation using the GaussianCurveFitter yielding 5.58, when all the
x-values differ by 1?

Many thanks for your help! -- H
-- 
OpenPGP: https://hasan.d8u.us/openpgp.asc
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable