Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added sample size estimator for a case of binomial proportion #730

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

pkaf
Copy link

@pkaf pkaf commented Sep 16, 2020

Description

Related issues or pull requests

Pull Request Checklist

  • [X ] Added a note about the modification or contribution to the ./docs/sources/CHANGELOG.md file (if applicable)
  • [ X] Added appropriate unit test functions in the ./mlxtend/*/tests directories (if applicable)
  • Modify documentation in the corresponding Jupyter Notebook under mlxtend/docs/sources/ (if applicable)
  • [ X] Ran PYTHONPATH='.' pytest ./mlxtend -sv and 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

@coveralls
Copy link

coveralls commented Sep 16, 2020

Coverage Status

Coverage increased (+0.002%) to 90.662% when pulling 4f07177 on pkaf:sample_size_estimator into 276fdd3 on rasbt:master.

@rasbt
Copy link
Owner

rasbt commented Sep 18, 2020

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?

@pkaf
Copy link
Author

pkaf commented Sep 20, 2020

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.

@rasbt
Copy link
Owner

rasbt commented Sep 21, 2020

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 :)

@pkaf
Copy link
Author

pkaf commented Sep 23, 2020

All good. Anything please let me know.

@rasbt
Copy link
Owner

rasbt commented Nov 26, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants