[SciPy-Dev] Van der Waerden test in Scipy?

josef.pktd@gmai... josef.pktd@gmai...
Wed Jun 1 09:30:19 CDT 2011


On Wed, Jun 1, 2011 at 3:56 AM, Annalisa Minelli <annalisa.py@gmail.com> wrote:
> Dear Scipy developers,
> I'm Annalisa Minelli, a PhD student from Perugia (Italy), and I'm using
> Scipy library because I'm writing some code for my PhD thesis.
> Since I needed van der waerden chisquare pvalue[0], which is implemented in
> R but not in Scipy (if I'm not wrong)[1], I implemented the test in python
> language [3] to break any R dependency for my module.
>
> So if you think it can be useful, maybe it could be integrated into the
> Scipy library?
> Could you give me any advice on how to proceed?

Thanks Annalisa,

I think it would be useful to have this test (and similar tests based
on transformation to the normal distribution).

I downloaded your vdw.py. I haven't looked at the details yet, but
here are 3 main issues:

your vdw is GPL which is incompatible with scipy's BSD license, for
inclusion in scipy it would need to be a contribution licensed as BSD

your function is not using numpy, and it seems to me that many of the
list operations can be vectorized with numpy

no tests: since you have the equivalent function in R, it would be
good to add some tests that have results from R to check that the
function produces the same results. ( for explanation and examples:
https://github.com/numpy/numpy/blob/master/doc/TESTS.rst.txt or look
in scipy.stats.tests )

additional: docstring should follow the numpy standard, see examples
in current functions and
https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt#docstring-standard


How to proceed if these issues are addressed:
Since it is a new function, it would be easy to integrate it into
scipy from the python files, but if you are familiar with git and
github, the integration will eventually be easier if you fork scipy
and add the function to scipy.stats and make a pull request.
A trac ticket would also be useful to keep track of the contribution
(I don't know if github will substitute for this).
At the beginning, it might be easiest to discuss this on the mailing list.

Cheers, and thanks for any contributions,

Josef

>
> Best Regards,
> Annalisa Minelli
>
>
> [0]: http://en.wikipedia.org/wiki/Van_der_Waerden_test
> [1]: http://rss.acs.unt.edu/Rdoc/library/agricolae/html/VanderWarden.html
> [2]: http://amirror4thesun.blogspot.com/2011/05/van-der-waerden-test.html
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
>


More information about the SciPy-Dev mailing list