Added sample size estimator for a case of binomial proportion
Description
Related issues or pull requests
Pull Request Checklist
- [X ] Added a note about the modification or contribution to the
./docs/sources/CHANGELOG.mdfile (if applicable) - [ X] Added appropriate unit test functions in the
./mlxtend/*/testsdirectories (if applicable) - [ ] Modify documentation in the corresponding Jupyter Notebook under
mlxtend/docs/sources/(if applicable) - [ X] Ran
PYTHONPATH='.' pytest ./mlxtend -svand make sure that all unit tests pass (for small modifications, it might be sufficient to only run the specific test file, e.g.,PYTHONPATH='.' pytest ./mlxtend/classifier/tests/test_stacking_cv_classifier.py -sv) - [X ] Checked for style issues by running
flake8 ./mlxtend
Coverage increased (+0.002%) to 90.662% when pulling 4f0717715d662ae59fbe35a942afea1dab4319d2 on pkaf:sample_size_estimator into 276fdd31ee32a58752da92cba915e1edc85a93fb on rasbt:master.
Thanks a lot! Btw. is there a way you can add some unit tests to make sure the results are as intended? Maybe comparing it with an equivalent implementation in R or sth along these lines?
Numbers in the LHS of assert statements within test_one_sided_binomial_proportion_estimates() and test_two_sided_binomial_proportion_estimates() are taken from there. Are you suggesting something more/different?
Happy to add.
Oh I am sorry, I may have overlooked the unit test file before. Sorry, it's been a hectic week due to teaching. Will go over it more carefully soon :)
All good. Anything please let me know.
Coming back to this, the context of this function is to compute the sample size for normal approximation intervals / hypothesis tests based on normal approximations? Just asking because we probably should draft a documentation for this. Maybe we could embed this in the context of normal approximation-based confidence intervals and t-tests like I described here on pg. 10: https://arxiv.org/pdf/1811.12808.pdf