On Wed, May 30, 2012 at 12:46 PM, Andreas Hilboll <lists@hilboll.de> wrote:
Hi,
while working on the tests for the new scipy.interpolate.{Smooth,LSQ}SphereBiavariateSpline classes, I'm wondering how to come up with sensible TRUE example values to test against.
In the case mentioned (see https://github.com/scipy/scipy/pull/192), I simply wrapped a routine (sphere.f) from FITPACK. So I could write a direct FORTRAN program using sphere.f to calculate some "TRUE" values. However, that would just check that the wrapping actually works.
Is this considered enough? Ultimately, I would like a test to assure that the results are correct. But for that, wouldn't it be "better" (whatever that means) to use a different library to calculate the TRUE results?
It's better to verify against results from an outside library, but it's not always possible to find exactly the same algorithm. In that case, all we can test is whether the numbers are approximately (wil low precision) the same. Many of the scipy.stats function are now and most of statsmodels models are verified against R (or other packages). (lowess is no identical to R up to 6 decimals or so.) In some cases it's possible to verify against a theoretical and hand calculated example, but I guess not in your case. Josef
Sorry, this might be a confusing email.
Cheers, Andreas. _______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev