Hi, I implemented the Cramer-von-Mises test for two samples in PR 13263 <https://github.com/scipy/scipy/pull/13263>, The proposed name is cramervonmises_2samp. The one-sample version (cramervonmises) was already released in version 1.6.0. Since a few names of tests in scipy.stats were recently discussed on the mailing list (though cramervonmises was not), I just wanted to mention the PR here in case there are concerns about the name. One additional remark: for the KS test, there are three functions: kstest, ks_1samp, ks_2samp and kstest can be used both for the one- and two-sample tests. In my view, this makes the definition of kstest quite complicated since the meaning of the parameters depends on the version of the test and one needs a helper function _parse_kstest_args(data1, data2, args, N) in stats/stats.py So maybe cramervonmises_1samp and cramervonmises_2samp would have been a good choice, though I hope the names cramervonmises and cramervonmises_2samp also guide the user when to use which function. (While writing this message, I noted that the documentation of cramervonmises should state more clearly that it is about the one-sample test, e.g. "Perform the Cramér-von Mises test for goodness of fit.' --> 'Perfrom the one-sample ...') Any views? Thanks for your feedback Christoph
Hi Christoph, On Sat, Feb 27, 2021 at 9:34 PM Christoph Baumgarten < christoph.baumgarten@gmail.com> wrote:
Hi,
I implemented the Cramer-von-Mises test for two samples in PR 13263 <https://github.com/scipy/scipy/pull/13263>, The proposed name is cramervonmises_2samp. The one-sample version (cramervonmises) was already released in version 1.6.0. Since a few names of tests in scipy.stats were recently discussed on the mailing list (though cramervonmises was not), I just wanted to mention the PR here in case there are concerns about the name.
This seems like a nice function to add.
One additional remark: for the KS test, there are three functions: kstest, ks_1samp, ks_2samp and kstest can be used both for the one- and two-sample tests. In my view, this makes the definition of kstest quite complicated since the meaning of the parameters depends on the version of the test and one needs a helper function _parse_kstest_args(data1, data2, args, N) in stats/stats.py
So maybe cramervonmises_1samp and cramervonmises_2samp would have been a good choice, though I hope the names cramervonmises and cramervonmises_2samp also guide the user when to use which function. (While writing this message, I noted that the documentation of cramervonmises should state more clearly that it is about the one-sample test, e.g. "Perform the Cramér-von Mises test for goodness of fit.' --> 'Perfrom the one-sample ...')
I agree with your assessment - `kstest` doing both is not great, keeping things separate like for cramervonmises(_2samp) is nicer. Cheers, Ralf
Any views? Thanks for your feedback
Christoph _______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
participants (2)
-
Christoph Baumgarten -
Ralf Gommers